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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson [draw.io] <david@jgraph.com>2020-07-16 16:55:25 +0300
committerDavid Benson [draw.io] <david@jgraph.com>2020-07-16 16:55:25 +0300
commitd8513984589c10ccc05cdf58e29b73f6ebc9ecb7 (patch)
treebacdb7d92e9c7dcfb466c3ebad96429863f18b20
parentae9fb2626885fa49110510bbc459fe8378b2e3e0 (diff)
13.4.5 releasev13.4.5
-rw-r--r--ChangeLog4
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js1057
-rw-r--r--src/main/webapp/js/diagramly/App.js9
-rw-r--r--src/main/webapp/js/diagramly/Devel.js56
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js150
-rw-r--r--src/main/webapp/js/diagramly/DrawioFile.js2
-rw-r--r--src/main/webapp/js/diagramly/DriveClient.js2
-rw-r--r--src/main/webapp/js/diagramly/DriveFile.js2
-rw-r--r--src/main/webapp/js/diagramly/Editor.js19
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js37
-rw-r--r--src/main/webapp/js/diagramly/Init.js15
-rw-r--r--src/main/webapp/js/diagramly/Menus.js8
-rw-r--r--src/main/webapp/js/mxgraph/EditorUi.js2
-rw-r--r--src/main/webapp/js/viewer-static.min.js1580
-rw-r--r--src/main/webapp/js/viewer.min.js1580
-rw-r--r--src/main/webapp/package.json6
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/yarn.lock34
19 files changed, 2303 insertions, 2264 deletions
diff --git a/ChangeLog b/ChangeLog
index 3fc9372c..77c1592a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+16-JUL-2020: 13.4.5
+
+- Fixes ignored right meta key on macOS
+
15-JUL-2020: 13.4.4
- Fixes shape picker container insert
diff --git a/VERSION b/VERSION
index 24a9ec7a..2150631c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-13.4.4 \ No newline at end of file
+13.4.5 \ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index ea41e19c..82702eff 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -223,16 +223,16 @@ newSeed:function(){return U.newSeed()}}}();
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");
-window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";
-window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";
-window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
-window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
+window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";
+window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";
+window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";
+window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskadi",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
he:"עברית",ar:"العربية",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net",b=a.length-c.length,c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");
+if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");"viewer.diagrams.net"==window.location.hostname&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");
(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"4.2.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&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:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&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.")&&
@@ -2286,8 +2286,8 @@ EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"
"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var c=a.setDefaultParent,d=this;this.editor.graph.setDefaultParent=function(){c.apply(this,
arguments);d.updateActionStates()};a.editLink=d.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,c=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){"mouseDown"==b.getProperty("eventName")&&c.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));var d=
-a.dblClick;a.dblClick=function(a,b){if(this.isEnabled())if(null!=b||null==c.sidebar||mxEvent.isShiftDown(a))d.apply(this,arguments);else{var e=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));c.showShapePicker(e.x,e.y)}};if(null!=this.hoverIcons){var b=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();b.apply(this,arguments)};var f=this.hoverIcons.execute;this.hoverIcons.execute=function(b,d,g){var e=g.getEvent();mxEvent.isControlDown(e)||mxEvent.isShiftDown(e)?
-f.apply(this,arguments):this.graph.connectVertex(b.cell,d,this.graph.defaultEdgeLength,e,null,null,mxUtils.bind(this,function(d,e,f){d=a.getCompositeParent(b.cell);for(e=a.getCellGeometry(d);null!=d&&a.model.isVertex(d)&&null!=e&&e.relative;)cell=d,d=a.model.getParent(cell),e=a.getCellGeometry(d);c.showShapePicker(g.getGraphX(),g.getGraphY(),d,mxUtils.bind(this,function(a){f(a)}))}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,e,this)}))}}};
+a.dblClick;a.dblClick=function(a,b){if(this.isEnabled())if(null!=b||null==c.sidebar||mxEvent.isShiftDown(a))d.apply(this,arguments);else{mxEvent.consume(a);var e=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));c.showShapePicker(e.x,e.y)}};if(null!=this.hoverIcons){var b=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();b.apply(this,arguments)};var f=this.hoverIcons.execute;this.hoverIcons.execute=function(b,d,g){var e=g.getEvent();mxEvent.isControlDown(e)||
+mxEvent.isShiftDown(e)?f.apply(this,arguments):this.graph.connectVertex(b.cell,d,this.graph.defaultEdgeLength,e,null,null,mxUtils.bind(this,function(d,e,f){d=a.getCompositeParent(b.cell);e=a.getCellGeometry(d);for(g.consume();null!=d&&a.model.isVertex(d)&&null!=e&&e.relative;)cell=d,d=a.model.getParent(cell),e=a.getCellGeometry(d);c.showShapePicker(g.getGraphX(),g.getGraphY(),d,mxUtils.bind(this,function(a){f(a)}))}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,e,this)}))}}};
EditorUi.prototype.showShapePicker=function(a,c,d,b){var f=this.getCellsForShapePicker(d);if(null!=f&&0<f.length){var e=this,h=this.editor.graph,g=document.createElement("div"),k=null!=d?h.copyStyle(d):null;g.className="geToolbarContainer geSidebarContainer geSidebar";g.style.cssText="position:absolute;left:"+(a-22)+"px;top:"+(c-22)+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";null!=h.background&&h.background!=mxConstants.NONE&&
(g.style.backgroundColor=h.background);h.container.appendChild(g);d=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";g.appendChild(f);null!=k&&this.sidebar.graph.pasteStyle(k,[d]);e.insertHandler([d],""!=d.value,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);
mxEvent.addListener(f,"click",function(){if(null!=b)b(d);else{d.geometry.x=h.snap(Math.round(a/h.view.scale)-h.view.translate.x-d.geometry.width/2);d.geometry.y=h.snap(Math.round(c/h.view.scale)-h.view.translate.y-d.geometry.height/2);h.model.beginUpdate();try{h.addCell(d)}finally{h.model.endUpdate()}h.setSelectionCell(d);h.scrollCellToVisible(h.getSelectionCell());h.startEditingAtCell(d)}e.hideShapePicker()})});for(var l=0;l<f.length;l++)d(f[l]);h.tooltipHandler.hideTooltip();this.hideCurrentMenu();
@@ -8997,8 +8997,8 @@ DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveR
DrawioFile.prototype.synchronizeFile=function(a,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,e):this.updateFile(a,e)};
DrawioFile.prototype.updateFile=function(a,e,c,b){null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=k?this.mergeFile(k,a,e,b):this.reloadFile(a,e))}catch(f){null!=e&&e(f)}}),e))};
DrawioFile.prototype.mergeFile=function(a,e,c,b){var k=!0;try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),l=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=l&&0<l.length){this.shadowPages=l;this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var d=[this.ui.diffPages(null!=b?b:f,this.shadowPages)];if(!this.ignorePatches(d)){var g=this.ui.patchPages(f,
-d[0]);b={};var m=this.ui.getHashValueForPages(g,b),f={},n=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",n==m,m);if(null!=m&&m!=n){var p=this.compressReportData(this.getAnonymizedXmlForPages(l)),u=this.compressReportData(this.getAnonymizedXmlForPages(g)),t=this.ui.hashValue(a.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,d,"Shadow Details: "+JSON.stringify(b)+
-"\nChecksum: "+m+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+t+"\nTo: "+q+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+u,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+d[0]);b={};var m=this.ui.getHashValueForPages(g,b),f={},n=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",n==m,m);if(null!=m&&m!=n){var p=this.compressReportData(this.getAnonymizedXmlForPages(l)),t=this.compressReportData(this.getAnonymizedXmlForPages(g)),u=this.ui.hashValue(a.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,d,"Shadow Details: "+JSON.stringify(b)+
+"\nChecksum: "+m+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+u+"\nTo: "+q+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+t,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
null!=c&&c(y);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var v=this.getCurrentUser(),x=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,y)}}catch(A){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var e=new mxCodec(mxUtils.createXmlDocument()),c=e.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var k=e.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,k,!0);c.appendChild(k)}return mxUtils.getPrettyXml(c)};
DrawioFile.prototype.compressReportData=function(a,e,c){e=null!=e?e:1E4;null!=c&&null!=a&&a.length>c?a=a.substring(0,c)+"[...]":null!=a&&a.length>e&&(a=Graph.compress(a)+"\n");return a};
@@ -9007,7 +9007,7 @@ DrawioFile.prototype.checksumError=function(a,e,c,b,k){this.stats.checksumErrors
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(g){}}}catch(g){}};
DrawioFile.prototype.sendErrorReport=function(a,e,c,b){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),f=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),l=this.getCurrentUser(),d=null!=l?this.ui.hashValue(l.id):"unknown",g=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",m=this.getTitle(),n=m.lastIndexOf("."),l="xml";0<n&&(l=m.substring(n));var p=null!=c?c.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+l+")\nUser="+d+g+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
-"")+(null!=c?"\n\nError: "+c.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+k+"\n\nData:\n"+f,b)}catch(u){}};
+"")+(null!=c?"\n\nError: "+c.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+k+"\n\nData:\n"+f,b)}catch(t){}};
DrawioFile.prototype.reloadFile=function(a,e){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),e=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(e,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=this.stats);null!=a&&
a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}catch(b){null!=e&&e(b)}};DrawioFile.prototype.copyFile=function(a,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var e=!0,c=0;c<a.length&&e;c++)e=e&&0==Object.keys(a[c]).length;return e};
@@ -9031,9 +9031,9 @@ DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer
DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=Editor.guid());var a={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(a));EditorUi.debug("draft saved",this.draftId,a)}catch(e){console.error(e),this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(this.ui.removeDatabaseItem(".draft_"+this.draftId),EditorUi.debug("draft deleted",".draft_"+this.draftId))}catch(a){}};
DrawioFile.prototype.addUnsavedStatus=function(a){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(a instanceof Error&&null!=a.message&&""!=a.message){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert" style="overflow:hidden;">'+e+" ("+mxUtils.htmlEntities(a.message)+")</div>")}else{e=this.getErrorMessage(a);if(null==e&&null!=this.lastSaved){var c=this.ui.timeSince(new Date(this.lastSaved));
-null!=c&&(e=mxResources.get("lastSaved",[c]))}null!=e&&60<e.length&&(e=e.substring(0,60)+"...");e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":"");this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlertOrange" style="cursor:pointer;overflow:hidden;">'+e+' <img src="'+Editor.saveImage+'" align="top" style="width:16px;margin-top:-2px"/></div>');e=this.ui.statusContainer.getElementsByTagName("div");null!=e&&0<e.length?
-mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):(e=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert" style="overflow:hidden;">'+e+" ("+mxUtils.htmlEntities(a.message)+")</div>"));EditorUi.enableDrafts&&null==this.getMode()&&(null!=this.saveDraftThread&&window.clearTimeout(this.saveDraftThread),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,
-function(){this.saveDraft()}),0))}};
+null!=c&&(e=mxResources.get("lastSaved",[c]))}null!=e&&60<e.length&&(e=e.substring(0,60)+"...");e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":"");this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlertOrange" style="cursor:pointer;overflow:hidden;">'+e+' <img src="'+Editor.saveImage+'" align="top" style="width:16px;margin-top:'+(mxClient.IS_FF?-3:-2)+'px"/></div>');e=this.ui.statusContainer.getElementsByTagName("div");
+null!=e&&0<e.length?mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):(e=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert" style="overflow:hidden;">'+e+" ("+mxUtils.htmlEntities(a.message)+")</div>"));EditorUi.enableDrafts&&null==this.getMode()&&(null!=this.saveDraftThread&&window.clearTimeout(this.saveDraftThread),this.saveDraftThread=
+window.setTimeout(mxUtils.bind(this,function(){this.saveDraft()}),0))}};
DrawioFile.prototype.addConflictStatus=function(a,e){this.invalidChecksum&&null==e&&(e=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":""));this.ui.spinner.stop();this.clearAutosave();var c=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=c&&0<c.length?mxEvent.addListener(c[0],"click",mxUtils.bind(this,function(b){"IMG"!=mxEvent.getSource(b).nodeName&&
a()})):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),a)};DrawioFile.prototype.setConflictStatus=function(a){this.ui.editor.setStatus('<div title="'+a+'" class="geStatusAlert geBlink" style="cursor:pointer;overflow:hidden;">'+a+' <a href="https://desk.draw.io/support/solutions/articles/16000087947" target="_blank"><img border="0" style="margin-left:2px;cursor:help;opacity:0.5;width:16px;height:16px;" valign="bottom" src="'+Editor.helpImage+'" style=""/></a></div>')};
DrawioFile.prototype.showRefreshDialog=function(a,e,c){null==c&&(c=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(a,e)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(a,e)}),c),this.ui.showError(mxResources.get("error")+" ("+c+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,
@@ -9076,24 +9076,25 @@ StorageFile.listFiles=function(a,e,c,b){a.getDatabaseItems(function(a){var b=[];
StorageLibrary.prototype.isRenamable=function(a,e,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,e,c){DrawioFile.call(this,a,e);this.title=c;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(a,e,c){RemoteFile.call(this,a,e,c.title);this.libObj=c};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(a,e,c){};
RemoteLibrary.prototype.saveAs=function(a,e,c){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,e,c){StorageFile.call(this,a,e,c);a=c;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,c){return!1};UrlLibrary.prototype.saveAs=function(a,e,c){};UrlLibrary.prototype.open=function(){};/*
mxClient.IS_IOS || */
-var StorageDialog=function(a,e,c){function b(d,b,f,k,u,l){function z(){mxEvent.addListener(t,"click",null!=l?l: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);e()})):f==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,g.checked);
-e()})):(a.setMode(f,g.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}++m>c&&(mxUtils.br(n),m=0);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.marginTop="2px";t.style.padding="8px 10px 12px 10px";t.style.width="88px";t.style.height=StorageDialog.extended?"50px":
-"100px";t.style.whiteSpace="nowrap";t.setAttribute("title",b);mxClient.IS_QUIRKS&&(t.style.cssFloat="left",t.style.zoom="1");var G=document.createElement("div");G.style.textOverflow="ellipsis";G.style.overflow="hidden";if(null!=d){var q=document.createElement("img");q.setAttribute("src",d);q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width=StorageDialog.extended?"24px":"60px";q.style.height=StorageDialog.extended?"24px":"60px";q.style.paddingBottom=StorageDialog.extended?
-"4px":"6px";t.appendChild(q)}else G.style.paddingTop="5px",G.style.whiteSpace="normal",mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(G.style.paddingTop="0px",G.style.marginTop="-2px");StorageDialog.extended&&(t.style.paddingTop="4px",t.style.marginBottom="0px",G.display="inline-block",2==c&&(q.style.width="38px",q.style.height="38px",t.style.width="80px",t.style.height="68px"));t.appendChild(G);mxUtils.write(G,b);if(null!=u)for(d=0;d<u.length;d++)mxUtils.br(G),
-mxUtils.write(G,u[d]);if(null!=k&&null==a[k]){q.style.visibility="hidden";mxUtils.setOpacity(G,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(t);var B=window.setTimeout(function(){null==a[k]&&(v.stop(),t.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(d,b){null!=a[k]&&b.getProperty("client")==a[k]&&(window.clearTimeout(B),mxUtils.setOpacity(G,
-100),q.style.visibility="",v.stop(),z(),"drive"==k&&null!=p.parentNode&&p.parentNode.removeChild(p))}))}else z();n.appendChild(t)}c=null!=c?c:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var f=a.addLanguageMenu(k,!0);null!=f&&(f.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title",
+var StorageDialog=function(a,e,c){function b(b,f,p,k,t,l){function z(){mxEvent.addListener(u,"click",null!=l?l:function(){p!=App.MODE_GOOGLE||a.isDriveDomain()?p==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(p,d.checked);e()})):p==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(p,d.checked);
+e()})):(a.setMode(p,d.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}++g>c&&(mxUtils.br(m),g=0);var u=document.createElement("a");u.style.overflow="hidden";u.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";u.className="geBaseButton";u.style.boxSizing="border-box";u.style.fontSize="11px";u.style.position="relative";u.style.margin="4px";u.style.marginTop="2px";u.style.padding="8px 10px 12px 10px";u.style.width="88px";u.style.height=StorageDialog.extended?"50px":
+"100px";u.style.whiteSpace="nowrap";u.setAttribute("title",f);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.overflow="hidden";if(null!=b){var H=document.createElement("img");H.setAttribute("src",b);H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width=StorageDialog.extended?"24px":"60px";H.style.height=StorageDialog.extended?"24px":"60px";H.style.paddingBottom=StorageDialog.extended?
+"4px":"6px";u.appendChild(H)}else q.style.paddingTop="5px",q.style.whiteSpace="normal",mxClient.IS_IOS?(u.style.padding="0px 10px 20px 10px",u.style.top="6px"):mxClient.IS_FF&&(q.style.paddingTop="0px",q.style.marginTop="-2px");StorageDialog.extended&&(u.style.paddingTop="4px",u.style.marginBottom="0px",q.display="inline-block",2==c&&(H.style.width="38px",H.style.height="38px",u.style.width="80px",u.style.height="68px"));u.appendChild(q);mxUtils.write(q,f);if(null!=t)for(b=0;b<t.length;b++)mxUtils.br(q),
+mxUtils.write(q,t[b]);if(null!=k&&null==a[k]){H.style.visibility="hidden";mxUtils.setOpacity(q,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(u);var B=window.setTimeout(function(){null==a[k]&&(v.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(d,b){null!=a[k]&&b.getProperty("client")==a[k]&&(window.clearTimeout(B),mxUtils.setOpacity(q,
+100),H.style.visibility="",v.stop(),z(),"drive"==k&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else z();m.appendChild(u)}c=null!=c?c:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var f=a.addLanguageMenu(k,!0);null!=f&&(f.style.bottom=parseInt("28px")-3+"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.userSelect="none";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 l=document.createElement("img");mxUtils.setOpacity(l,50);l.style.height="16px";l.style.width="16px";l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);l.style.marginRight="2px";f.appendChild(l);
-mxUtils.write(f,mxResources.get("help"));k.appendChild(f)}var d=document.createElement("div");d.style.position="absolute";d.style.cursor="pointer";d.style.fontSize="12px";d.style.bottom="28px";d.style.color="gray";d.style.userSelect="none";mxUtils.write(d,mxResources.get("decideLater"));mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0)");d.style.left="50%";this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)d.style.marginLeft=-Math.round(d.clientWidth/2)+"px"};k.appendChild(d);
-mxEvent.addListener(d,"click",function(){a.hideDialog();var d=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=d});f=document.createElement("div");mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");f.style.border="1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";f.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=
-!0;var m=0,n=document.createElement("div");n.style.paddingTop="2px";f.appendChild(n);var p=document.createElement("p"),l=document.createElement("p");l.style.fontSize="16pt";l.style.padding="0px";l.style.paddingTop="4px";l.style.paddingBottom="16px";l.style.margin="0px";l.style.color="gray";mxUtils.write(l,mxResources.get("saveDiagramsTo")+":");k.appendChild(l);var u=function(){m=0;"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");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);StorageDialog.extended&&("function"===typeof window.DropboxClient&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,
-"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};k.appendChild(f);u();l=document.createElement("p");l.style.marginTop="8px";l.style.marginBottom="6px";var t=document.createElement("div");t.style.marginBottom="10px";if(!a.isOfflineApp()){var q=document.createElement("a");q.style.color="gray";q.style.fontSize="12px";q.style.cursor="pointer";
-q.style.userSelect="none";mxUtils.write(q,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");t.appendChild(q);l.appendChild(t);mxEvent.addListener(q,"click",function(a){n.innerHTML="";q.innerHTML="";StorageDialog.extended=!StorageDialog.extended;u();mxUtils.write(q,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}l.appendChild(g);var v=document.createElement("span");v.style.color="gray";v.style.fontSize=
-"12px";v.style.userSelect="none";mxUtils.write(v," "+mxResources.get("rememberThisSetting"));l.appendChild(v);mxUtils.br(l);t=a.getRecent();if(!a.isOfflineApp()&&null!=t&&0<t.length){var x=document.createElement("select");x.style.marginTop="8px";x.style.maxWidth="170px";var y=document.createElement("option");y.setAttribute("value","");y.setAttribute("selected","selected");y.style.textAlign="center";mxUtils.write(y,mxResources.get("openRecent")+"...");x.appendChild(y);for(y=0;y<t.length;y++)(function(a){var d=
-a.mode;d==App.MODE_GOOGLE?d="googleDrive":d==App.MODE_ONEDRIVE&&(d="oneDrive");var b=document.createElement("option");b.setAttribute("value",a.id);mxUtils.write(b,a.title+" ("+mxResources.get(d)+")");x.appendChild(b)})(t[y]);l.appendChild(x);mxEvent.addListener(x,"change",function(d){""!=x.value&&a.loadFile(x.value)})}else l.style.marginTop="20px",f.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(t=document.createElement("div"),t.style.marginBottom="10px",t.style.padding="18px 0px 6px 0px",
-y=document.createElement("a"),y.style.cursor="pointer",y.style.fontSize="12px",y.style.color="gray",y.style.userSelect="none",mxUtils.write(y,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(y,"click",function(){if(null==a.storageFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",function(){null!=d.files&&
-(a.hideDialog(),a.openFiles(d.files,!0),d.type="",d.type="file",d.value="")});d.style.display="none";document.body.appendChild(d);a.storageFileInputElt=d}a.storageFileInputElt.click()}),t.appendChild(y),l.appendChild(t),f.style.paddingBottom="4px");f.appendChild(l);mxEvent.addListener(v,"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&&
-(p.style.padding="8px",p.style.fontSize="9pt",p.style.marginTop="-14px",p.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",k.appendChild(p))},5E3);this.container=k};StorageDialog.extended=!1;
+mxUtils.write(f,mxResources.get("help"));k.appendChild(f)}this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)q.style.marginLeft=-Math.round(q.clientWidth/2)+"px"};f=document.createElement("div");mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");f.style.border="1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";f.style.padding="12px 0px 12px 0px";var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");
+d.defaultChecked=!0;var g=0,m=document.createElement("div");m.style.paddingTop="2px";f.appendChild(m);var n=document.createElement("p"),l=document.createElement("p");l.style.fontSize="16pt";l.style.padding="0px";l.style.paddingTop="4px";l.style.paddingBottom="16px";l.style.margin="0px";l.style.color="gray";mxUtils.write(l,mxResources.get("saveDiagramsTo")+":");k.appendChild(l);var p=function(){g=0;"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");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);StorageDialog.extended&&("function"===typeof window.DropboxClient&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
+App.MODE_DROPBOX,"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};k.appendChild(f);p();l=document.createElement("p");l.style.marginTop="8px";l.style.marginBottom="6px";var t=document.createElement("div");t.style.marginBottom="10px";if(!a.isOfflineApp()){var u=document.createElement("a");u.style.color="gray";u.style.cursor="pointer";u.style.userSelect=
+"none";mxUtils.write(u,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");t.appendChild(u);l.appendChild(t);mxEvent.addListener(u,"click",function(a){m.innerHTML="";u.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(u,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}var q=document.createElement("div");q.style.cursor="pointer";q.style.color="gray";q.style.userSelect="none";
+mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"...");mxEvent.addListener(q,"click",function(){if(null==a.storageFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",function(){null!=d.files&&(a.hideDialog(),a.openFiles(d.files,!0),d.type="",d.type="file",d.value="")});d.style.display="none";document.body.appendChild(d);
+a.storageFileInputElt=d}a.storageFileInputElt.click()});l.appendChild(q);t=a.getRecent();if(!a.isOfflineApp()&&null!=t&&0<t.length){var v=document.createElement("select");v.style.marginTop="12px";v.style.maxWidth="170px";var x=document.createElement("option");x.setAttribute("value","");x.setAttribute("selected","selected");x.style.textAlign="center";mxUtils.write(x,mxResources.get("openRecent")+"...");v.appendChild(x);for(x=0;x<t.length;x++)(function(a){var d=a.mode;d==App.MODE_GOOGLE?d="googleDrive":
+d==App.MODE_ONEDRIVE&&(d="oneDrive");var b=document.createElement("option");b.setAttribute("value",a.id);mxUtils.write(b,a.title+" ("+mxResources.get(d)+")");v.appendChild(b)})(t[x]);l.appendChild(v);mxEvent.addListener(v,"change",function(d){""!=v.value&&a.loadFile(v.value)})}else l.style.marginTop="20px",f.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(t=document.createElement("div"),t.style.marginBottom="10px",t.style.padding="18px 0px 6px 0px",x=document.createElement("a"),x.style.cursor=
+"pointer",x.style.color="gray",x.style.userSelect="none",mxUtils.write(x,mxResources.get("decideLater")),mxEvent.addListener(x,"click",function(){a.hideDialog();var d=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=d}),t.appendChild(x),l.appendChild(t),f.style.paddingBottom="4px");f.appendChild(l);t=document.createElement("div");t.style.position="absolute";t.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";t.style.cursor="pointer";
+t.style.fontSize="12px";t.style.bottom="27px";t.style.left="0px";t.style.right="0px";t.style.color="gray";t.style.userSelect="none";d.setAttribute("id","geRememberSettingCheckbox");d.style.marginRight="6px";d.style.cursor="inherit";t.appendChild(d);f=document.createElement("label");f.setAttribute("for","geRememberSettingCheckbox");mxUtils.write(f,mxResources.get("rememberThisSetting"));f.style.cursor="inherit";t.appendChild(f);mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,0)");t.style.left=
+"50%";k.appendChild(t);mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="7px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+
+"</a>",k.appendChild(n))},5E3);this.container=k};StorageDialog.extended=!1;
var SplashDialog=function(a){var e=document.createElement("div");e.style.textAlign="center";var c=a.addLanguageMenu(e,!0);null!=c&&(c.style.bottom="19px");c=null;c=a.getServiceCount();if(!a.isOffline()&&1<c){c=document.createElement("a");c.setAttribute("href","https://about.draw.io/support/");c.setAttribute("title",mxResources.get("help"));c.setAttribute("target","_blank");c.style.position="absolute";c.style.fontSize="12px";c.style.textDecoration="none";c.style.cursor="pointer";c.style.bottom="22px";
c.style.left="26px";c.style.color="gray";var b=document.createElement("img");mxUtils.setOpacity(b,50);b.style.height="16px";b.style.width="16px";b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";c.appendChild(b);mxUtils.write(c,mxResources.get("help"));e.appendChild(c)}c=document.createElement("p");c.style.fontSize="16pt";c.style.padding="0px";c.style.paddingTop="2px";c.style.margin="0px";c.style.color="gray";b=document.createElement("img");
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 k="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(b.src=IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(b.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(b.src=IMAGE_PATH+
@@ -9112,29 +9113,29 @@ var d=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=f?mxUtils.write(b,f):
!1,null)):(g.setAttribute("readonly","true"),g.value=e.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!d||navigator.standalone||!(d||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var b=5E5>e.length?
g.value:e;if(null!=k)k(b);else if(d)try{var m=a.openLink(b);null!=m&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=m&&null!=m.location.href&&m.location.href.substring(0,8)!=b.substring(0,8)&&(m.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}catch(v){}}),c||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var f=window.open(),f=null!=f?f.document:null;null!=f?(f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),f.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",f.appendChild(m));if(!d||7500<e.length){var n=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",e,"text/plain")});n.className="geBtn";f.appendChild(n)}if(d&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var p=mxUtils.button("",function(){try{var d="https://www.facebook.com/sharer.php?p[url]="+
-encodeURIComponent(g.value);a.openLink(d)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}}),n=document.createElement("img");n.setAttribute("src",Editor.facebookImage);n.setAttribute("width","18");n.setAttribute("height","18");n.setAttribute("border","0");p.appendChild(n);p.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";f.appendChild(p)}7168>
-e.length&&(p=mxUtils.button("",function(){try{var d="https://twitter.com/intent/tweet?text="+encodeURIComponent(l)+"&url="+encodeURIComponent(g.value);a.openLink(d)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}}),n=document.createElement("img"),n.setAttribute("src",Editor.tweetImage),n.setAttribute("width","18"),n.setAttribute("height","18"),n.setAttribute("border","0"),n.style.marginBottom="5px",p.appendChild(n),p.setAttribute("title",mxResources.get("twitter")+
+encodeURIComponent(g.value);a.openLink(d)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),n=document.createElement("img");n.setAttribute("src",Editor.facebookImage);n.setAttribute("width","18");n.setAttribute("height","18");n.setAttribute("border","0");p.appendChild(n);p.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";f.appendChild(p)}7168>
+e.length&&(p=mxUtils.button("",function(){try{var d="https://twitter.com/intent/tweet?text="+encodeURIComponent(l)+"&url="+encodeURIComponent(g.value);a.openLink(d)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),n=document.createElement("img"),n.setAttribute("src",Editor.tweetImage),n.setAttribute("width","18"),n.setAttribute("height","18"),n.setAttribute("border","0"),n.style.marginBottom="5px",p.appendChild(n),p.setAttribute("title",mxResources.get("twitter")+
" ("+a.formatFileSize(7168)+" max)"),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className="geBtn",f.appendChild(p))}n=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(n);p=mxUtils.button(mxResources.get("copy"),function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});
5E5>e.length?mxClient.IS_SF||null!=document.documentMode?n.className="geBtn gePrimaryBtn":(f.appendChild(p),p.className="geBtn gePrimaryBtn",n.className="geBtn"):(f.appendChild(m),n.className="geBtn",m.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,e){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(B.checked&&""!=u.value){var d="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(u.value));null!=a&&(d+="&title="+encodeURIComponent(a));0<C.length&&(d+="&s="+C);""!=t.value&&"0"!=t.value&&(d+="&border="+t.value);""!=p.value&&(d+="&height="+p.value);d+="&pan="+(q.checked?"1":"0");d+="&zoom="+(v.checked?"1":"0");d+="&fit="+(z.checked?"1":"0");
-d+="&resize="+(A.checked?"1":"0");d+="&x0="+Number(n.value);d+="&y0="+g;k.mathEnabled&&(d+="&math=1");y.checked?d+="&edit=_blank":x.checked&&(d+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=d}else D.constructor==DriveFile||D.constructor==DropboxFile?(d="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=u.value?d+=encodeURIComponent(mxUtils.htmlEntities(u.value))+"&type=3":(d+=D.getHash().substring(1),d=D.constructor==DropboxFile?d+"&type=2":d+"&type=1"),null!=
+var GoogleSitesDialog=function(a,e){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(B.checked&&""!=t.value){var d="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=a&&(d+="&title="+encodeURIComponent(a));0<C.length&&(d+="&s="+C);""!=u.value&&"0"!=u.value&&(d+="&border="+u.value);""!=p.value&&(d+="&height="+p.value);d+="&pan="+(q.checked?"1":"0");d+="&zoom="+(v.checked?"1":"0");d+="&fit="+(z.checked?"1":"0");
+d+="&resize="+(A.checked?"1":"0");d+="&x0="+Number(n.value);d+="&y0="+g;k.mathEnabled&&(d+="&math=1");y.checked?d+="&edit=_blank":x.checked&&(d+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=d}else D.constructor==DriveFile||D.constructor==DropboxFile?(d="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?d+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(d+=D.getHash().substring(1),d=D.constructor==DropboxFile?d+"&type=2":d+"&type=1"),null!=
a&&(d+="&title="+encodeURIComponent(a)),""!=p.value&&(a=parseInt(p.value)+parseInt(n.value),d+="&height="+a),m.value=d):m.value=""}var b=document.createElement("div"),k=a.editor.graph,f=k.getGraphBounds(),l=k.view.scale,d=Math.floor(f.x/l-k.view.translate.x),g=Math.floor(f.y/l-k.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";
b.appendChild(m);mxUtils.br(b);this.init=function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginRight="16px";n.style.marginLeft="4px";n.value=d;b.appendChild(n);mxUtils.write(b,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type",
-"text");p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(f.height/l);b.appendChild(p);mxUtils.br(b);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";b.appendChild(f);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","28");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";u.value=e||"";
-b.appendChild(u);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";b.appendChild(t);mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";b.appendChild(q);mxUtils.write(b,mxResources.get("pan")+" ");var v=document.createElement("input");
+"text");p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(f.height/l);b.appendChild(p);mxUtils.br(b);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";b.appendChild(f);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var 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 u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";b.appendChild(u);mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";b.appendChild(q);mxUtils.write(b,mxResources.get("pan")+" ");var v=document.createElement("input");
v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);b.appendChild(x);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,
mxResources.get("asNew")+" ");mxUtils.br(b);var A=document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="16px";b.appendChild(A);mxUtils.write(b,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";b.appendChild(z);mxUtils.write(b,mxResources.get("fit")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft=
-"8px";b.appendChild(B);mxUtils.write(b,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(q,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(u,"change",c);c();
+"8px";b.appendChild(B);mxUtils.write(b,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(q,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(t,"change",c);c();
mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";f.appendChild(l);b.appendChild(f);this.container=b},CreateGraphDialog=function(a,e,c){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 f=new Graph(e);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 l="curved=1;";f.cellRenderer.installCellOverlayListeners=
function(a,d,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(b){d.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(b){d.fireEvent(new mxEventObject("pointerdown","event",b,"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,l);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var d=f.getDefaultParent(),g=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 e=f.getCellGeometry(a),m;p(function(){m=f.insertVertex(d,null,"Entry",e.x,e.y,80,30,"rounded=1;");g(m);f.view.refresh(m);
f.insertEdge(d,null,"",a,m,l)},function(){f.scrollCellToVisible(m)})});b.addListener("pointerdown",function(a,d){var b=d.getProperty("event"),c=d.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var e=mxUtils.convertPoint(f.container,mxEvent.getClientX(b),mxEvent.getClientY(b));f.connectionHandler.start(c,e.x,e.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var m;try{m=f.insertVertex(d,null,"Start",
0,0,80,30,"ellipse"),g(m)}finally{f.getModel().endUpdate()}var n;"horizontalTree"==c?(n=new mxCompactTreeLayout(f),n.edgeRouting=!1,n.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(n=new mxCompactTreeLayout(f,!1),n.edgeRouting=!1,n.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(n=new mxRadialTreeLayout(f,!1),n.edgeRouting=!1,n.levelDistance=80):"verticalFlow"==c?n=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-c?n=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(n=new mxFastOrganicLayout(f,!1),n.forceConstant=80):"circle"==c&&(n=new mxCircleLayout(f));if(null!=n){var p=function(a,d){f.getModel().beginUpdate();try{null!=a&&a(),n.execute(f.getDefaultParent(),m)}catch(A){throw A;}finally{var b=new mxMorphing(f);b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=d&&d()}));b.startAnimation()}},u=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,d,b,c,e){u.apply(this,arguments);p()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(f.destroy(),e.parentNode.removeChild(e));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&b.appendChild(t);var q=mxUtils.button(mxResources.get("insert"),function(d){f.clearCellOverlays();
+c?n=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(n=new mxFastOrganicLayout(f,!1),n.forceConstant=80):"circle"==c&&(n=new mxCircleLayout(f));if(null!=n){var p=function(a,d){f.getModel().beginUpdate();try{null!=a&&a(),n.execute(f.getDefaultParent(),m)}catch(A){throw A;}finally{var b=new mxMorphing(f);b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=d&&d()}));b.startAnimation()}},t=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,d,b,c,e){t.apply(this,arguments);p()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(f.destroy(),e.parentNode.removeChild(e));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var q=mxUtils.button(mxResources.get("insert"),function(d){f.clearCellOverlays();
var b=f.getModel().getChildren(f.getDefaultParent());d=mxEvent.isAltDown(d)?a.editor.graph.getFreeInsertPoint():a.editor.graph.getCenterInsertPoint(f.getBoundingBoxFromGeometry(b,!0));b=a.editor.graph.importCells(b,d.x,d.y);d=a.editor.graph.view;var c=d.getBounds(b);c.x-=d.translate.x;c.y-=d.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);null!=e.parentNode&&(f.destroy(),e.parentNode.removeChild(e));a.hideDialog()});b.appendChild(q);q.className="geBtn gePrimaryBtn";
-a.editor.cancelFirst||b.appendChild(t)};this.container=b};
+a.editor.cancelFirst||b.appendChild(u)};this.container=b};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
var BackgroundImageDialog=function(a,e,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var k=document.createElement("h2");mxUtils.write(k,mxResources.get("backgroundImage"));k.style.marginTop="0px";b.appendChild(k);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var f=document.createElement("input");f.setAttribute("type","text");f.style.marginTop="4px";f.style.marginBottom="4px";f.style.width="350px";f.value=null!=c?c.src:"";var l=!1,d=!1,
@@ -9147,15 +9148,15 @@ k.className="geBtn";a.editor.cancelFirst&&c.appendChild(k);applyBtn=mxUtils.butt
b||"plantUmlSvg"==b||"plantUmlTxt"==b){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var g=function(d,b,e,g,n){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(new mxRectangle(0,0,g,n));var p=null;m.getModel().beginUpdate();try{p="txt"==b?a.insertAsPreText(e,f.x,f.y):m.insertVertex(null,null,null,f.x,f.y,g,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(e)+";"),m.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:d,format:b},null,
2))}finally{m.getModel().endUpdate()}null!=p&&(m.setSelectionCell(p),m.scrollCellToVisible(p))},m=a.editor.graph,n="plantUmlTxt"==b?"txt":"plantUmlPng"==b?"png":"svg";"@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"==d&&"svg"==n?window.setTimeout(function(){a.spinner.stop();g(d,n,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
295,212)},200):a.generatePlantUmlImage(d,n,function(b,c,e){a.spinner.stop();g(d,n,b,c,e)},function(d){a.handleError(d)})}}else if("mermaid"==b)a.spinner.spin(document.body,mxResources.get("inserting"))&&(m=a.editor.graph,a.generateMermaidImage(d,n,function(b,e,g){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(new mxRectangle(0,0,e,g));a.spinner.stop();var n=null;m.getModel().beginUpdate();try{n=m.insertVertex(null,null,null,f.x,f.y,e,g,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-b+";"),m.setAttributeForCell(n,"mermaidData",JSON.stringify({data:d,config:EditorUi.defaultMermaidConfig},null,2))}finally{m.getModel().endUpdate()}null!=n&&(m.setSelectionCell(n),m.scrollCellToVisible(n))},function(d){a.handleError(d)}));else if("table"==b){var p=null,k=[],u=0;for(b=0;b<e.length;b++){var l=mxUtils.trim(e[b]);if("create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),p=new mxCell(l,new mxGeometry(u,
-0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,k.push(p),l=a.editor.graph.getPreferredSizeForCell(q),null!=l&&(p.geometry.width=l.width+10);else if(null!=p&&")"==l.charAt(0))u+=p.geometry.width+40,p=null;else if("("!=l&&null!=p&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var t=l.toLowerCase().indexOf("primary key"),
-l=l.replace(/primary key/i,""),q=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<t?"1":"0")+";");q.vertex=!0;var I=new mxCell(0<t?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<t?"fontStyle=1;":""));I.vertex=!0;q.insert(I);l=new mxCell(l,new mxGeometry(30,
-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<t?"fontStyle=5;":""));l.vertex=!0;q.insert(l);l=a.editor.graph.getPreferredSizeForCell(l);null!=l&&p.geometry.width<l.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,l.width+30)));p.insert(q);p.geometry.height+=30}}0<k.length&&(m=a.editor.graph,f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0)),m.setSelectionCells(m.importCells(k,
+b+";"),m.setAttributeForCell(n,"mermaidData",JSON.stringify({data:d,config:EditorUi.defaultMermaidConfig},null,2))}finally{m.getModel().endUpdate()}null!=n&&(m.setSelectionCell(n),m.scrollCellToVisible(n))},function(d){a.handleError(d)}));else if("table"==b){var p=null,k=[],t=0;for(b=0;b<e.length;b++){var l=mxUtils.trim(e[b]);if("create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),p=new mxCell(l,new mxGeometry(t,
+0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,k.push(p),l=a.editor.graph.getPreferredSizeForCell(q),null!=l&&(p.geometry.width=l.width+10);else if(null!=p&&")"==l.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=l&&null!=p&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var u=l.toLowerCase().indexOf("primary key"),
+l=l.replace(/primary key/i,""),q=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<u?"1":"0")+";");q.vertex=!0;var I=new mxCell(0<u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<u?"fontStyle=1;":""));I.vertex=!0;q.insert(I);l=new mxCell(l,new mxGeometry(30,
+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<u?"fontStyle=5;":""));l.vertex=!0;q.insert(l);l=a.editor.graph.getPreferredSizeForCell(l);null!=l&&p.geometry.width<l.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,l.width+30)));p.insert(q);p.geometry.height+=30}}0<k.length&&(m=a.editor.graph,f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0)),m.setSelectionCells(m.importCells(k,
f.x,f.y)),m.scrollCellToVisible(m.getSelectionCell()))}else if("list"==b){if(0<e.length){m=a.editor.graph;q=null;k=[];for(b=p=0;b<e.length;b++)";"!=e[b].charAt(0)&&(0==e[b].length?q=null:null==q?(q=new mxCell(e[b],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),q.vertex=!0,k.push(q),l=m.getPreferredSizeForCell(q),null!=l&&q.geometry.width<l.width+10&&(q.geometry.width=
-l.width+10),p+=q.geometry.width+40):"--"==e[b]?(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,q.geometry.height+=l.geometry.height,q.insert(l)):0<e[b].length&&(u=new mxCell(e[b],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-u.vertex=!0,l=m.getPreferredSizeForCell(u),null!=l&&u.geometry.width<l.width&&(u.geometry.width=l.width),q.geometry.width=Math.max(q.geometry.width,u.geometry.width),q.geometry.height+=u.geometry.height,q.insert(u)));if(0<k.length){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0));m.getModel().beginUpdate();try{k=m.importCells(k,f.x,f.y);l=[];for(b=0;b<k.length;b++)l.push(k[b]),l=l.concat(k[b].children);m.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{m.getModel().endUpdate()}m.setSelectionCells(k);
-m.scrollCellToVisible(m.getSelectionCell())}}}else{var q=function(a){var d=G[a];null==d&&(d=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),d.vertex=!0,G[a]=d,k.push(d));return d},G={},k=[];for(b=0;b<e.length;b++)if(";"!=e[b].charAt(0)){var K=e[b].split("->");2<=K.length&&(t=q(K[0]),I=q(K[K.length-1]),K=new mxCell(2<K.length?K[1]:"",new mxGeometry),K.edge=!0,t.insertEdge(K,!0),I.insertEdge(K,!1),k.push(K))}if(0<k.length){e=document.createElement("div");e.style.visibility="hidden";
-document.body.appendChild(e);m=new Graph(e);m.getModel().beginUpdate();try{k=m.importCells(k);for(b=0;b<k.length;b++)m.getModel().isVertex(k[b])&&(l=m.getPreferredSizeForCell(k[b]),k[b].geometry.width=Math.max(k[b].geometry.width,l.width),k[b].geometry.height=Math.max(k[b].geometry.height,l.height));p=new mxFastOrganicLayout(m);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(m.getDefaultParent());u=new mxParallelEdgeLayout(m);u.spacing=20;u.execute(m.getDefaultParent())}finally{m.getModel().endUpdate()}m.clearCellOverlays();
+l.width+10),p+=q.geometry.width+40):"--"==e[b]?(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,q.geometry.height+=l.geometry.height,q.insert(l)):0<e[b].length&&(t=new mxCell(e[b],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,l=m.getPreferredSizeForCell(t),null!=l&&t.geometry.width<l.width&&(t.geometry.width=l.width),q.geometry.width=Math.max(q.geometry.width,t.geometry.width),q.geometry.height+=t.geometry.height,q.insert(t)));if(0<k.length){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0));m.getModel().beginUpdate();try{k=m.importCells(k,f.x,f.y);l=[];for(b=0;b<k.length;b++)l.push(k[b]),l=l.concat(k[b].children);m.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{m.getModel().endUpdate()}m.setSelectionCells(k);
+m.scrollCellToVisible(m.getSelectionCell())}}}else{var q=function(a){var d=H[a];null==d&&(d=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),d.vertex=!0,H[a]=d,k.push(d));return d},H={},k=[];for(b=0;b<e.length;b++)if(";"!=e[b].charAt(0)){var K=e[b].split("->");2<=K.length&&(u=q(K[0]),I=q(K[K.length-1]),K=new mxCell(2<K.length?K[1]:"",new mxGeometry),K.edge=!0,u.insertEdge(K,!0),I.insertEdge(K,!1),k.push(K))}if(0<k.length){e=document.createElement("div");e.style.visibility="hidden";
+document.body.appendChild(e);m=new Graph(e);m.getModel().beginUpdate();try{k=m.importCells(k);for(b=0;b<k.length;b++)m.getModel().isVertex(k[b])&&(l=m.getPreferredSizeForCell(k[b]),k[b].geometry.width=Math.max(k[b].geometry.width,l.width),k[b].geometry.height=Math.max(k[b].geometry.height,l.height));p=new mxFastOrganicLayout(m);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(m.getDefaultParent());t=new mxParallelEdgeLayout(m);t.spacing=20;t.execute(m.getDefaultParent())}finally{m.getModel().endUpdate()}m.clearCellOverlays();
l=[];a.editor.graph.getModel().beginUpdate();try{k=m.getModel().getChildren(m.getDefaultParent()),f=mxEvent.isAltDown(c)?f:a.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0)),l=a.editor.graph.importCells(k,f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(l);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());m.destroy();e.parentNode.removeChild(e)}}}function k(){return"list"==
d.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==d.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==d.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"==d.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"==d.value||"plantUmlTxt"==d.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":
@@ -9164,43 +9165,43 @@ null!=c&&"fromText"!=c||g.setAttribute("selected","selected");g=document.createE
mxUtils.write(g,mxResources.get("diagram"));"plantUml"!=c&&d.appendChild(g);g=document.createElement("option");g.setAttribute("value","plantUmlSvg");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==c&&g.setAttribute("selected","selected");var m=document.createElement("option");m.setAttribute("value","plantUmlPng");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var n=document.createElement("option");n.setAttribute("value",
"plantUmlTxt");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(d.appendChild(g),d.appendChild(m),d.appendChild(n));var p=k();l.value=p;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 d=new FileReader;d.onload=function(a){l.value=a.target.result};d.readAsText(a)}},!1));e.appendChild(d);mxEvent.addListener(d,"change",function(){var a=k();if(0==l.value.length||l.value==p)p=a,l.value=p});a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),g.className="geBtn",e.appendChild(g));g=mxUtils.button(mxResources.get("close"),
-function(){l.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});g.className="geBtn";a.editor.cancelFirst&&e.appendChild(g);m=mxUtils.button(mxResources.get("insert"),function(c){a.hideDialog();b(l.value,d.value,c)});e.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(g);this.container=e},NewDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,u,t,q,v,x){function y(){var a=!0;if(null!=N)for(;G<N.length&&(a||0!=mxUtils.mod(G,30));){var d=
-N[G++],d=B(d.url,d.libs,d.title,d.tooltip?d.tooltip:d.title,d.select,d.imgUrl,d.info,d.onClick,d.preview,d.noImg,d.clibs);a&&d.click();a=!1}}function A(){if(ba)c||a.hideDialog(),t(ba,T,I.value);else if(b)c||a.hideDialog(),b(U,I.value);else{var d=I.value;null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,U,null!=Y&&0<Y.length?Y:null,null,function(){a.hideDialog()},null,b,null,null!=V&&0<V.length?V:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function z(a,
-b,c,e,m,f){null!=Z&&(Z.style.backgroundColor="transparent",Z.style.border="1px solid transparent");H.removeAttribute("disabled");U=b;Y=c;V=f;Z=a;ba=e;T=m;Z.style.backgroundColor=d;Z.style.border=g}function B(d,b,c,e,g,m,f,n,p,k,l){var u=document.createElement("div");u.className="geTemplate";u.style.height=M+"px";u.style.width=ga+"px";"dark"==uiTheme&&(u.style.filter="invert(100%)");null!=c?u.setAttribute("title",mxResources.get(c,null,c)):null!=e&&0<e.length&&u.setAttribute("title",e);if(null!=m)u.style.backgroundImage=
-"url("+m+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(a){z(u,null,null,d,f,l)}),mxEvent.addListener(u,"dblclick",function(a){A()});else if(!k&&null!=d&&0<d.length){e=p||TEMPLATE_PATH+"/"+d.substring(0,d.length-4)+".png";u.style.backgroundImage="url("+e+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=c&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+
-("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+(M-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var G=!1;mxEvent.addListener(u,"click",function(c){H.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border=
-"1px solid transparent";c=d;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;K.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){K.stop();200<=a.getStatus()&&299>=a.getStatus()&&(z(u,a.getText(),b,null,null,l),G&&A())}))});mxEvent.addListener(u,"dblclick",function(a){G=!0})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
-(M-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",g&&z(u),null!=n?mxEvent.addListener(u,"click",n):(mxEvent.addListener(u,"click",function(a){z(u,null,null,d,f)}),mxEvent.addListener(u,"dblclick",function(a){A()}));P.appendChild(u);return u}function C(){sa&&(sa=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<da){var d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
+function(){l.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});g.className="geBtn";a.editor.cancelFirst&&e.appendChild(g);m=mxUtils.button(mxResources.get("insert"),function(c){a.hideDialog();b(l.value,d.value,c)});e.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(g);this.container=e},NewDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,t,u,q,v,x){function y(){var a=!0;if(null!=N)for(;H<N.length&&(a||0!=mxUtils.mod(H,30));){var d=
+N[H++],d=B(d.url,d.libs,d.title,d.tooltip?d.tooltip:d.title,d.select,d.imgUrl,d.info,d.onClick,d.preview,d.noImg,d.clibs);a&&d.click();a=!1}}function A(){if(ba)c||a.hideDialog(),u(ba,T,I.value);else if(b)c||a.hideDialog(),b(U,I.value);else{var d=I.value;null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,U,null!=Y&&0<Y.length?Y:null,null,function(){a.hideDialog()},null,b,null,null!=V&&0<V.length?V:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function z(a,
+b,c,e,m,f){null!=Z&&(Z.style.backgroundColor="transparent",Z.style.border="1px solid transparent");G.removeAttribute("disabled");U=b;Y=c;V=f;Z=a;ba=e;T=m;Z.style.backgroundColor=d;Z.style.border=g}function B(d,b,c,e,g,m,f,n,p,k,l){var t=document.createElement("div");t.className="geTemplate";t.style.height=M+"px";t.style.width=ga+"px";"dark"==uiTheme&&(t.style.filter="invert(100%)");null!=c?t.setAttribute("title",mxResources.get(c,null,c)):null!=e&&0<e.length&&t.setAttribute("title",e);if(null!=m)t.style.backgroundImage=
+"url("+m+")",t.style.backgroundSize="contain",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",mxEvent.addListener(t,"click",function(a){z(t,null,null,d,f,l)}),mxEvent.addListener(t,"dblclick",function(a){A()});else if(!k&&null!=d&&0<d.length){e=p||TEMPLATE_PATH+"/"+d.substring(0,d.length-4)+".png";t.style.backgroundImage="url("+e+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";null!=c&&(t.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+
+("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+(M-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var H=!1;mxEvent.addListener(t,"click",function(c){G.setAttribute("disabled","disabled");t.style.backgroundColor="transparent";t.style.border=
+"1px solid transparent";c=d;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;K.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){K.stop();200<=a.getStatus()&&299>=a.getStatus()&&(z(t,a.getText(),b,null,null,l),H&&A())}))});mxEvent.addListener(t,"dblclick",function(a){H=!0})}else t.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
+(M-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",g&&z(t),null!=n?mxEvent.addListener(t,"click",n):(mxEvent.addListener(t,"click",function(a){z(t,null,null,d,f)}),mxEvent.addListener(t,"dblclick",function(a){A()}));P.appendChild(t);return t}function C(){sa&&(sa=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<da){var d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
mxUtils.write(d,mxResources.get("custom"));Q.appendChild(d);for(var b in X){var c=document.createElement("div"),d=b,e=X[b];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;user-select:none;";c.setAttribute("title",d+" ("+e.length+")");mxUtils.write(c,c.getAttribute("title"));null!=m&&(c.style.padding=m);Q.appendChild(c);(function(d,b){mxEvent.addListener(c,"click",function(){a!=
-b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",G=0,N=X[d],O=null,y())})})(b,c)}d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(d,"draw.io");Q.appendChild(d)}for(b in R)c=document.createElement("div"),d=mxResources.get(b),e=R[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;user-select:none;",
-c.setAttribute("title",d+" ("+e.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=m&&(c.style.padding=m),Q.appendChild(c),null==a&&0<e.length&&(a=c,a.style.backgroundColor=l,N=e),function(d,b){mxEvent.addListener(c,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",G=0,N=R[d],O=null,y())})}(b,c);y()}c=null!=c?c:!0;k=null!=k?k:!1;l=null!=l?l:"#ebf2f9";d=null!=d?d:"dark"==uiTheme?"#a2a2a2":"#e6eff8";g=null!=g?g:"dark"==uiTheme?"1px dashed #00a8ff":
+b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",H=0,N=X[d],O=null,y())})})(b,c)}d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(d,"draw.io");Q.appendChild(d)}for(b in R)c=document.createElement("div"),d=mxResources.get(b),e=R[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;user-select:none;",
+c.setAttribute("title",d+" ("+e.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=m&&(c.style.padding=m),Q.appendChild(c),null==a&&0<e.length&&(a=c,a.style.backgroundColor=l,N=e),function(d,b){mxEvent.addListener(c,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",H=0,N=R[d],O=null,y())})}(b,c);y()}c=null!=c?c:!0;k=null!=k?k:!1;l=null!=l?l:"#ebf2f9";d=null!=d?d:"dark"==uiTheme?"#a2a2a2":"#e6eff8";g=null!=g?g:"dark"==uiTheme?"1px dashed #00a8ff":
"1px solid #ccd9ea";n=null!=n?n:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";c&&D.appendChild(E);var F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.width="40px";F.style.height="40px";F.style.marginRight="10px";F.style.paddingBottom="4px";F.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?
IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!e&&c&&E.appendChild(F);c&&mxUtils.write(E,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+
":");F=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?F=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?F=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?F=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?F=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?F=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(F=a.trello.extension);var I=document.createElement("input");I.setAttribute("value",a.defaultFilename+F);I.style.marginLeft="10px";
I.style.width=e?"144px":"244px";this.init=function(){c&&(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?I.select():document.execCommand("selectAll",!1,null))};c&&(E.appendChild(I),null!=a.editor.diagramFileTypes&&(F=FilenameDialog.createFileTypes(a,I,a.editor.diagramFileTypes),F.style.marginLeft="6px",F.style.width=e?"80px":"180px",E.appendChild(F)),null!=a.editor.fileExtensions&&(F=FilenameDialog.createTypeHint(a,I,a.editor.fileExtensions),F.style.marginTop=
-"12px",E.appendChild(F)));var E=!1,G=0,K=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}),H=mxUtils.button(v||mxResources.get("create"),function(){H.setAttribute("disabled","disabled");A();H.removeAttribute("disabled")});H.className="geBtn gePrimaryBtn";if(p||u){var L=[],O=null,J=null,S=null,W=function(a){H.setAttribute("disabled","disabled");for(var d=0;d<L.length;d++)L[d].className=d==a?"geBtn gePrimaryBtn":"geBtn"},
-E=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";D.appendChild(v);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";P.style.left="160px";W(0);P.scrollTop=0;P.innerHTML="";G=0;O!=N&&(N=O,R=J,da=S,Q.innerHTML="",C(),O=null)});L.push(F);v.appendChild(F);var aa=function(a){Q.style.display="none";P.style.left="30px";W(a?-1:1);null==O&&(O=N);P.scrollTop=0;P.innerHTML="";K.spin(P);var d=function(a,d,b){G=0;K.stop();N=a;b=b||
-{};var c=0,e;for(e in b)c+=b[e].length;if(d)P.innerHTML=d;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<c){Q.style.display="";P.style.left="160px";Q.innerHTML="";da=0;R={"draw.io":a};for(e in b)R[e]=b[e];C()}else y()};a?u(ca.value,d):p(d)};p&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){aa()}),v.appendChild(F),L.push(F));if(u){F=document.createElement("span");F.style.marginLeft="10px";
+"12px",E.appendChild(F)));var E=!1,H=0,K=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}),G=mxUtils.button(v||mxResources.get("create"),function(){G.setAttribute("disabled","disabled");A();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";if(p||t){var L=[],O=null,J=null,S=null,W=function(a){G.setAttribute("disabled","disabled");for(var d=0;d<L.length;d++)L[d].className=d==a?"geBtn gePrimaryBtn":"geBtn"},
+E=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";D.appendChild(v);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";P.style.left="160px";W(0);P.scrollTop=0;P.innerHTML="";H=0;O!=N&&(N=O,R=J,da=S,Q.innerHTML="",C(),O=null)});L.push(F);v.appendChild(F);var aa=function(a){Q.style.display="none";P.style.left="30px";W(a?-1:1);null==O&&(O=N);P.scrollTop=0;P.innerHTML="";K.spin(P);var d=function(a,d,b){H=0;K.stop();N=a;b=b||
+{};var c=0,e;for(e in b)c+=b[e].length;if(d)P.innerHTML=d;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<c){Q.style.display="";P.style.left="160px";Q.innerHTML="";da=0;R={"draw.io":a};for(e in b)R[e]=b[e];C()}else y()};a?t(ca.value,d):p(d)};p&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){aa()}),v.appendChild(F),L.push(F));if(t){F=document.createElement("span");F.style.marginLeft="10px";
F.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");v.appendChild(F);var ca=document.createElement("input");ca.style.marginRight="10px";ca.style.marginLeft="10px";ca.style.width="220px";mxEvent.addListener(ca,"keypress",function(a){13==a.keyCode&&aa(!0)});v.appendChild(ca);F=mxUtils.button(mxResources.get("search"),function(){aa(!0)});F.className="geBtn";v.appendChild(F)}W(0)}var Y=null,V=null,U=null,Z=null,ba=null,T=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";
P.style.position="absolute";P.style.left="160px";P.style.right="34px";v=(c?72:40)+(E?30:0);P.style.top=v+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var M=140,ga=140,R={},X={},da=0,sa=!0;R.basic=[{title:"blankDiagram",select:!0}];var N=R.basic;if(!e){var ha=function(){mxUtils.get(ea,
function(a){if(!fa){fa=!0;a=a.getXml().documentElement.firstChild;for(var d={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var b=a.getAttribute("name"),c=a.getElementsByTagName("add"),e=[],g=0;g<c.length;g++)e.push(encodeURIComponent(mxUtils.getTextContent(c[g])));null!=b&&0<e.length&&(d[b]=e.join(";"))}else b=a.getAttribute("url"),null!=b&&(c=a.getAttribute("section"),null==c&&(c=b.indexOf("/"),c=b.substring(0,c)),b=R[c],null==b&&(b=[],R[c]=b),c=a.getAttribute("clibs"),
null!=d[c]&&(c=d[c]),b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}K.stop();C()}})};D.appendChild(Q);D.appendChild(P);var fa=!1,ea=n;/^https?:\/\//.test(ea)&&!a.editor.isCorsEnabledForUrl(ea)&&(ea=PROXY_URL+"?url="+encodeURIComponent(ea));K.spin(P);null!=x?x(function(a,d){X=a;S=da=d;ha()},ha):ha();J=R}mxEvent.addListener(I,"keypress",function(d){a.dialog.container.firstChild==
D&&13==d.keyCode&&A()});n=document.createElement("div");n.style.marginTop=e?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";e||a.isOffline()||!c||null!=b||k||(x=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",n.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});x.className=
"geBtn";!a.editor.cancelFirst||k&&null==f||n.appendChild(x);e||"1"==urlParams.embed||k||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var d=new FilenameDialog(a,"",mxResources.get("create"),function(d){null!=d&&0<d.length&&(d=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(I.value)+"&create="+encodeURIComponent(d)),null==a.getCurrentFile()?window.location.href=d:window.openWindow(d))},mxResources.get("url"));a.showDialog(d.container,300,80,!0,!0);d.init()}),
-e.className="geBtn",n.appendChild(e));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var d=document.createElement("input");d.setAttribute("multiple","multiple");d.setAttribute("type","file");mxEvent.addListener(d,"change",function(b){a.openFiles(d.files,!0);d.value=""});d.style.display="none";document.body.appendChild(d);a.newDlgFileInputElt=d}a.newDlgFileInputElt.click()}),q.className="geBtn",n.appendChild(q));n.appendChild(H);a.editor.cancelFirst||
-null!=b||k&&null==f||n.appendChild(x);D.appendChild(n);this.container=D},CreateDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,u,t,q,v,x){function y(d,b,c,g){function m(){mxEvent.addListener(f,"click",function(){var d=c;if(l){var b=B.value,g=b.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>g){var d=null!=d?d:E.value,m="";d==App.MODE_GOOGLE?m=a.drive.extension:d==App.MODE_GITHUB?m=a.gitHub.extension:d==App.MODE_GITLAB?m=a.gitLab.extension:d==App.MODE_TRELLO?m=a.trello.extension:d==App.MODE_DROPBOX?m=a.dropbox.extension:
+e.className="geBtn",n.appendChild(e));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var d=document.createElement("input");d.setAttribute("multiple","multiple");d.setAttribute("type","file");mxEvent.addListener(d,"change",function(b){a.openFiles(d.files,!0);d.value=""});d.style.display="none";document.body.appendChild(d);a.newDlgFileInputElt=d}a.newDlgFileInputElt.click()}),q.className="geBtn",n.appendChild(q));n.appendChild(G);a.editor.cancelFirst||
+null!=b||k&&null==f||n.appendChild(x);D.appendChild(n);this.container=D},CreateDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,t,u,q,v,x){function y(d,b,c,g){function m(){mxEvent.addListener(f,"click",function(){var d=c;if(l){var b=B.value,g=b.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>g){var d=null!=d?d:E.value,m="";d==App.MODE_GOOGLE?m=a.drive.extension:d==App.MODE_GITHUB?m=a.gitHub.extension:d==App.MODE_GITLAB?m=a.gitLab.extension:d==App.MODE_TRELLO?m=a.trello.extension:d==App.MODE_DROPBOX?m=a.dropbox.extension:
d==App.MODE_ONEDRIVE?m=a.oneDrive.extension:d==App.MODE_DEVICE&&(m=".drawio");0<=g&&(b=b.substring(0,g));B.value=b+m}}A(c)})}var f=document.createElement("a");f.style.overflow="hidden";var n=document.createElement("img");n.src=d;n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.width="60px";n.style.height="60px";n.style.paddingBottom="6px";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin="4px";f.style.padding=
-"8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(n);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var k=document.createElement("div");f.appendChild(k);mxUtils.write(k,b);if(null!=g&&null==a[g]){n.style.visibility="hidden";mxUtils.setOpacity(k,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(f);var G=window.setTimeout(function(){null==
-a[g]&&(u.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(G),mxUtils.setOpacity(k,100),n.style.visibility="",u.stop(),m())}))}else m();C.appendChild(f);++D==p&&(mxUtils.br(C),D=0)}function A(d){var b=B.value;if(null==d||null!=b&&0<b.length)x&&a.hideDialog(),c(b,d,B)}l=null!=l?l:!0;d=null!=d?d:!0;p=null!=p?p:4;x=null!=x?x:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var z=
+"8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(n);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var k=document.createElement("div");f.appendChild(k);mxUtils.write(k,b);if(null!=g&&null==a[g]){n.style.visibility="hidden";mxUtils.setOpacity(k,10);var t=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});t.spin(f);var H=window.setTimeout(function(){null==
+a[g]&&(t.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(H),mxUtils.setOpacity(k,100),n.style.visibility="",t.stop(),m())}))}else m();C.appendChild(f);++D==p&&(mxUtils.br(C),D=0)}function A(d){var b=B.value;if(null==d||null!=b&&0<b.length)x&&a.hideDialog(),c(b,d,B)}l=null!=l?l:!0;d=null!=d?d:!0;p=null!=p?p:4;x=null!=x?x:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var z=
document.createElement("h2");mxUtils.write(z,k||mxResources.get("create"));z.style.marginTop="0px";z.style.marginBottom="24px";f.appendChild(z);mxUtils.write(f,mxResources.get("filename")+":");var B=document.createElement("input");B.setAttribute("value",e);B.style.width="200px";B.style.marginLeft="10px";B.style.marginBottom="20px";B.style.maxWidth="70%";this.init=function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?B.select():document.execCommand("selectAll",
-!1,null)};f.appendChild(B);null!=v&&(null!=a.editor.diagramFileTypes&&(k=FilenameDialog.createFileTypes(a,B,a.editor.diagramFileTypes),k.style.marginLeft="6px",k.style.width="80px",f.appendChild(k)),f.appendChild(FilenameDialog.createTypeHint(a,B,v)));null==u||null==t||"image/"!=t.substring(0,6)||"image/svg"==t.substring(0,9)&&!mxClient.IS_SVG||(B.style.width="160px",v=document.createElement("img"),u=q?u:btoa(unescape(encodeURIComponent(u))),v.setAttribute("src","data:"+t+";base64,"+u),v.style.position=
+!1,null)};f.appendChild(B);null!=v&&(null!=a.editor.diagramFileTypes&&(k=FilenameDialog.createFileTypes(a,B,a.editor.diagramFileTypes),k.style.marginLeft="6px",k.style.width="80px",f.appendChild(k)),f.appendChild(FilenameDialog.createTypeHint(a,B,v)));null==t||null==u||"image/"!=u.substring(0,6)||"image/svg"==u.substring(0,9)&&!mxClient.IS_SVG||(B.style.width="160px",v=document.createElement("img"),t=q?t:btoa(unescape(encodeURIComponent(t))),v.setAttribute("src","data:"+u+";base64,"+t),v.style.position=
"absolute",v.style.top="70px",v.style.right="100px",v.style.maxWidth="120px",v.style.maxHeight="80px",mxUtils.setPrefixedStyle(v.style,"transform","translate(50%,-50%)"),f.appendChild(v),g&&Editor.popupsAllowed&&(v.style.cursor="pointer",mxEvent.addGestureListeners(v,null,null,function(){A("_blank")})));mxUtils.br(f);var C=document.createElement("div");C.style.textAlign="center";var D=0;C.style.marginTop="6px";f.appendChild(C);var E=document.createElement("select");E.style.marginLeft="10px";a.isOfflineApp()||
-a.isOffline()||("function"===typeof window.DriveClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(t,mxResources.get("googleDrive")),E.appendChild(t),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(t,mxResources.get("oneDrive")),E.appendChild(t),a.mode==App.MODE_ONEDRIVE&&
-t.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(t,mxResources.get("dropbox")),E.appendChild(t),a.mode==App.MODE_DROPBOX&&t.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(t=document.createElement("option"),
-t.setAttribute("value",App.MODE_GITHUB),mxUtils.write(t,mxResources.get("github")),E.appendChild(t),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITLAB),mxUtils.write(t,mxResources.get("gitlab")),E.appendChild(t),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(t=document.createElement("option"),t.setAttribute("value",
-App.MODE_TRELLO),mxUtils.write(t,mxResources.get("trello")),E.appendChild(t),y(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(t=document.createElement("option"),t.setAttribute("value",App.MODE_DEVICE),mxUtils.write(t,mxResources.get("device")),E.appendChild(t),a.mode!=App.MODE_DEVICE&&d||t.setAttribute("selected","selected"),n&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),
+a.isOffline()||("function"===typeof window.DriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(u,mxResources.get("googleDrive")),E.appendChild(u),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(u,mxResources.get("oneDrive")),E.appendChild(u),a.mode==App.MODE_ONEDRIVE&&
+u.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(u,mxResources.get("dropbox")),E.appendChild(u),a.mode==App.MODE_DROPBOX&&u.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(u=document.createElement("option"),
+u.setAttribute("value",App.MODE_GITHUB),mxUtils.write(u,mxResources.get("github")),E.appendChild(u),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GITLAB),mxUtils.write(u,mxResources.get("gitlab")),E.appendChild(u),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(u=document.createElement("option"),u.setAttribute("value",
+App.MODE_TRELLO),mxUtils.write(u,mxResources.get("trello")),E.appendChild(u),y(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(u=document.createElement("option"),u.setAttribute("value",App.MODE_DEVICE),mxUtils.write(u,mxResources.get("device")),E.appendChild(u),a.mode!=App.MODE_DEVICE&&d||u.setAttribute("selected","selected"),n&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),
App.MODE_DEVICE));d&&isLocalStorage&&"0"!=urlParams.browser&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_BROWSER),mxUtils.write(d,mxResources.get("browser")),E.appendChild(d),a.mode==App.MODE_BROWSER&&d.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="center";null!=m&&(n=mxUtils.button(mxResources.get("help"),function(){a.openLink(m)}),
-n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});n.className="geBtn";a.editor.cancelFirst&&d.appendChild(n);null==b&&(t=mxUtils.button(mxResources.get("decideLater"),function(){A(null)}),t.className="geBtn",d.appendChild(t));g&&Editor.popupsAllowed&&(g=mxUtils.button(mxResources.get("openInNewWindow"),function(){A("_blank")}),g.className="geBtn",d.appendChild(g));
+n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});n.className="geBtn";a.editor.cancelFirst&&d.appendChild(n);null==b&&(u=mxUtils.button(mxResources.get("decideLater"),function(){A(null)}),u.className="geBtn",d.appendChild(u));g&&Editor.popupsAllowed&&(g=mxUtils.button(mxResources.get("openInNewWindow"),function(){A("_blank")}),g.className="geBtn",d.appendChild(g));
CreateDialog.showDownloadButton&&(g=mxUtils.button(mxResources.get("download"),function(){A("download")}),g.className="geBtn",d.appendChild(g));a.editor.cancelFirst||d.appendChild(n);mxEvent.addListener(B,"keypress",function(d){13==d.keyCode?A(App.MODE_DEVICE):27==d.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});f.appendChild(d);this.container=f};CreateDialog.showDownloadButton=!0;
var PopupDialog=function(a,e,c,b,k){k=null!=k?k:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var l=mxUtils.button(mxResources.get("openInThisWindow"),function(){k&&a.hideDialog();null!=b&&b()});l.className="geBtn";l.style.marginBottom="8px";l.style.width="280px";f.appendChild(l);mxUtils.br(f);var d=mxUtils.button(mxResources.get("openInNewWindow"),function(){k&&a.hideDialog();null!=c&&c();a.openLink(e,
null,!0)});d.className="geBtn gePrimaryBtn";d.style.width=l.style.width;f.appendChild(d);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,e,c,b,k,f){f=null!=f?f:!0;var l=a.editor.graph,d=document.createElement("div");mxUtils.write(d,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=
@@ -9211,16 +9212,16 @@ mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(d)):(
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(d){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<d.dataTransfer.files.length)a.importFiles(d.dataTransfer.files,0,0,a.maxImageSize,function(a,d,b,c,e,g,m,f){n(a,
f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var d=0;d<a.length;d++)a[d]()},!mxEvent.isControlDown(d),null,null,!0);else if(0<=mxUtils.indexOf(d.dataTransfer.types,"text/uri-list")){var b=d.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(b)&&n(decodeURIComponent(b))}d.stopPropagation();d.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";c.style.textAlign="center";e=mxUtils.button(mxResources.get("cancel"),
function(){a.spinner.stop();a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&c.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&&(g.value=a.url));g.focus()};if(Graph.fileSupport){if(null==a.imgDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple");p.setAttribute("type","file");mxEvent.addListener(p,"change",function(d){null!=
-p.files&&(a.importFiles(p.files,0,0,a.maxImageSize,function(a,d,b,c,e,g){n(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var d=0;d<a.length;d++)a[d]()},!0),p.type="",p.type="file",p.value="")});p.style.display="none";document.body.appendChild(p);a.imgDlgFileInputElt=p}var u=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});u.className="geBtn";c.appendChild(u)}document.createElement("canvas").getContext&&"data:image/"==g.value.substring(0,
-11)&&"data:image/svg"!=g.value.substring(0,14)&&(u=mxUtils.button(mxResources.get("crop"),function(){var d=new CropImageDialog(a,g.value,function(a){g.value=a});a.showDialog(d.container,300,380,!0,!0);d.init()}),u.className="geBtn",c.appendChild(u));mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&n(g.value)});u=mxUtils.button(mxResources.get("apply"),function(){n(g.value)});u.className="geBtn gePrimaryBtn";c.appendChild(u);a.editor.cancelFirst||c.appendChild(e);Graph.fileSupport&&(c.style.marginTop=
+p.files&&(a.importFiles(p.files,0,0,a.maxImageSize,function(a,d,b,c,e,g){n(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var d=0;d<a.length;d++)a[d]()},!0),p.type="",p.type="file",p.value="")});p.style.display="none";document.body.appendChild(p);a.imgDlgFileInputElt=p}var t=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});t.className="geBtn";c.appendChild(t)}document.createElement("canvas").getContext&&"data:image/"==g.value.substring(0,
+11)&&"data:image/svg"!=g.value.substring(0,14)&&(t=mxUtils.button(mxResources.get("crop"),function(){var d=new CropImageDialog(a,g.value,function(a){g.value=a});a.showDialog(d.container,300,380,!0,!0);d.init()}),t.className="geBtn",c.appendChild(t));mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&n(g.value)});t=mxUtils.button(mxResources.get("apply"),function(){n(g.value)});t.className="geBtn gePrimaryBtn";c.appendChild(t);a.editor.cancelFirst||c.appendChild(e);Graph.fileSupport&&(c.style.marginTop=
"120px",d.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",d.style.backgroundPosition="center 65%",d.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")),d.appendChild(e));d.appendChild(c);this.container=d},LinkDialog=function(a,e,c,b,k){function f(a,d,b){b=mxUtils.button("",b);b.className=
"geBtn";b.setAttribute("title",d);d=document.createElement("img");d.style.height="26px";d.style.width="26px";d.setAttribute("src",a);b.style.minWidth="42px";b.style.verticalAlign="middle";b.appendChild(d);x.appendChild(b)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor=
"default";mxClient.IS_VML||(d.style.paddingRight="20px");var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("dragUrlsHere"));g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="100%";g.style.boxSizing="border-box";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";var m=document.createElement("div");m.setAttribute("title",mxResources.get("reset"));
m.style.position="relative";m.style.left="-16px";m.style.width="12px";m.style.height="14px";m.style.cursor="pointer";m.style.display=mxClient.IS_VML?"inline":"inline-block";m.style.top=(mxClient.IS_VML?0:3)+"px";m.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(m,"click",function(){g.value="";g.focus()});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 p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","current-linkdialog");var u=document.createElement("select");u.style.width="100%";if(k&&null!=a.pages){null!=e&&"data:page/id,"==e.substring(0,13)?(p.setAttribute("checked","checked"),p.defaultChecked=!0):(g.setAttribute("value",e),n.setAttribute("checked","checked"),n.defaultChecked=!0);d.appendChild(n);
-d.appendChild(g);d.appendChild(m);mxUtils.br(d);d.appendChild(p);k=!1;for(m=0;m<a.pages.length;m++){var t=document.createElement("option");mxUtils.write(t,a.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));t.setAttribute("value","data:page/id,"+a.pages[m].getId());e==t.getAttribute("value")&&(t.setAttribute("selected","selected"),k=!0);u.appendChild(t)}if(!k&&p.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");
-q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");u.appendChild(q);mxEvent.addListener(u,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)})}d.appendChild(u)}else g.setAttribute("value",e),d.appendChild(g),d.appendChild(m);l.appendChild(d);var v=mxUtils.button(c,function(){a.hideDialog();b(p.checked?"pageNotFound"!==u.value?u.value:e:g.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=
-function(){p.checked?u.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(u,"focus",function(){n.removeAttribute("checked");p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(g,"focus",function(){p.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var d=l.parentNode,b=null;mxEvent.addListener(d,"dragleave",function(a){null!=
+"current-linkdialog");var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","current-linkdialog");var t=document.createElement("select");t.style.width="100%";if(k&&null!=a.pages){null!=e&&"data:page/id,"==e.substring(0,13)?(p.setAttribute("checked","checked"),p.defaultChecked=!0):(g.setAttribute("value",e),n.setAttribute("checked","checked"),n.defaultChecked=!0);d.appendChild(n);
+d.appendChild(g);d.appendChild(m);mxUtils.br(d);d.appendChild(p);k=!1;for(m=0;m<a.pages.length;m++){var u=document.createElement("option");mxUtils.write(u,a.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));u.setAttribute("value","data:page/id,"+a.pages[m].getId());e==u.getAttribute("value")&&(u.setAttribute("selected","selected"),k=!0);t.appendChild(u)}if(!k&&p.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");
+q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");t.appendChild(q);mxEvent.addListener(t,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)})}d.appendChild(t)}else g.setAttribute("value",e),d.appendChild(g),d.appendChild(m);l.appendChild(d);var v=mxUtils.button(c,function(){a.hideDialog();b(p.checked?"pageNotFound"!==t.value?t.value:e:g.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=
+function(){p.checked?t.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(t,"focus",function(){n.removeAttribute("checked");p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(g,"focus",function(){p.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var d=l.parentNode,b=null;mxEvent.addListener(d,"dragleave",function(a){null!=
b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(c){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(d));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),n.setAttribute("checked",
"checked"),n.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000080137")});c.style.verticalAlign="middle";c.className="geBtn";x.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
c.style.verticalAlign="middle";c.className="geBtn";a.editor.cancelFirst&&x.appendChild(c);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var d=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?d="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(d="https://drive.google.com/#folders/"+
@@ -9228,7 +9229,7 @@ a.docs[0].id);g.value=d;g.focus()}else LinkDialog.selectedDocs=null;g.focus()};"
b=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),d=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(b).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED);a.linkPicker=d.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){g.value=a[0].link;g.focus()}})});null!=a.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,d){g.value=d.value[0].webUrl;g.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 d=a[0],b=a[1],c=a[2];a=a.slice(3,a.length).join("/");g.value="https://github.com/"+d+"/"+b+"/blob/"+c+"/"+a;g.focus()}})});null!=a.gitLab&&f(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var d=a[0],b=a[1],c=a[2];a=a.slice(3,a.length).join("/");g.value=DRAWIO_GITLAB_URL+"/"+d+"/"+b+"/blob/"+c+"/"+a;g.focus()}})});mxEvent.addListener(g,"keypress",function(d){13==d.keyCode&&(a.hideDialog(),b(p.checked?
-u.value:g.value,LinkDialog.selectedDocs))});x.appendChild(v);a.editor.cancelFirst||x.appendChild(c);l.appendChild(x);this.container=l},FeedbackDialog=function(a,e,c,b){var k=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";k.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));k.appendChild(f);
+t.value:g.value,LinkDialog.selectedDocs))});x.appendChild(v);a.editor.cancelFirst||x.appendChild(c);l.appendChild(x);this.container=l},FeedbackDialog=function(a,e,c,b){var k=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";k.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));k.appendChild(f);
var l=document.createElement("input");l.setAttribute("type","text");l.style.marginTop="6px";l.style.width="600px";var d=mxUtils.button(mxResources.get("sendMessage"),function(){var d=n.value+(m.checked?"\nDiagram:\n"+(null!=b?b:mxUtils.getXml(a.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;d.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(l.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+d),function(d){a.spinner.stop();200<=d.getStatus()&&299>=d.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});
d.className="geBtn gePrimaryBtn";if(!c){d.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(l,"change",function(){0<l.value.length&&0<g.test(l.value)?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled")});mxEvent.addListener(l,"keyup",function(){0<l.value.length&&g.test(l.value)?d.removeAttribute("disabled"):d.setAttribute("disabled",
@@ -9237,42 +9238,42 @@ mxUtils.write(f,mxResources.get("feedback"));k.appendChild(f);var n=document.cre
c.appendChild(f));k.appendChild(c);this.container=k};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,e,c){var b=document.createElement("div"),k=document.createElement("h3");k.style.marginTop="0px";mxUtils.write(k,mxResources.get("revisionHistory"));b.appendChild(k);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";b.appendChild(f);var 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 d=new Graph(l);d.setTooltips(!1);d.setEnabled(!1);d.setPanning(!0);d.panningHandler.ignoreCell=!0;d.panningHandler.useLeftButtonForPanning=!0;d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;var g=0,m=null,n=0,p=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=m&&null!=m[n]?m[n].getAttribute("name"):"pagenumber"==a?n+1:"pagecount"==a?null!=m?m.length:1:p.apply(this,arguments)};d.getLinkForCell=
-function(){return null};Editor.MathJaxRender&&d.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(d.container)}));var u=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),t=a.getCurrentFile(),q=null,v=null,x=null,y=null,A=mxUtils.button("",function(){null!=x&&d.zoomIn()});A.className="geSprite geSprite-zoomin";
+function(){return null};Editor.MathJaxRender&&d.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(d.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%"}),u=a.getCurrentFile(),q=null,v=null,x=null,y=null,A=mxUtils.button("",function(){null!=x&&d.zoomIn()});A.className="geSprite geSprite-zoomin";
A.setAttribute("title",mxResources.get("zoomIn"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var z=mxUtils.button("",function(){null!=x&&d.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var B=mxUtils.button("",function(){null!=x&&
(d.maxFitScale=8,d.fit(8),d.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var C=mxUtils.button("",function(){null!=x&&(d.zoomActual(),d.center())});C.className="geSprite geSprite-actualsize";C.setAttribute("title",mxResources.get("actualSize"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled",
"disabled");mxUtils.setOpacity(C,20);var D=document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var E=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var d=mxUtils.getXml(x.documentElement),b=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml"):(d=
-"undefined"===typeof pako?"&xml="+encodeURIComponent(d):"&data="+encodeURIComponent(Graph.compress(d)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+d)).simulate(document,"_blank"))}});E.className="geBtn";E.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&t.save(!0,function(d){a.spinner.stop();
-a.replaceFileData(y);a.hideDialog()},function(d){a.spinner.stop();a.editor.setStatus("");a.handleError(d,null!=d?mxResources.get("errorSavingFile"):null)})})});F.className="geBtn";F.setAttribute("disabled","disabled");var I=document.createElement("select");I.setAttribute("disabled","disabled");I.style.maxWidth="80px";I.style.position="relative";I.style.top="-2px";I.style.verticalAlign="bottom";I.style.marginRight="6px";I.style.display="none";var G=null;mxEvent.addListener(I,"change",function(a){null!=
-G&&(G(a),mxEvent.consume(a))});var K=mxUtils.button(mxResources.get("edit"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});K.className="geBtn";K.setAttribute("disabled","disabled");null!=c&&(K.style.display="none");var H=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(I.selectedIndex))});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled",
-"disabled");null!=c&&(H.style.display="none",F.className="geBtn gePrimaryBtn");k=document.createElement("div");k.style.position="absolute";k.style.top="482px";k.style.width="640px";k.style.textAlign="right";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.padding="2px";L.style.border="none";L.style.left="199px";L.style.top="442px";var O=null;if(null!=e&&0<e.length){l.style.cursor="move";var J=document.createElement("table");J.style.border=
-"1px solid lightGray";J.style.borderCollapse="collapse";J.style.borderSpacing="0px";J.style.width="100%";var S=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(g=mxUtils.indexOf(a.pages,a.currentPage));for(var aa=e.length-1;0<=aa;aa--){var ca=function(b){var c=new Date(b.modifiedDate),f=null;if(0<=c.getTime()){var p=function(e){u.stop();var p=mxUtils.parseXml(e),k=a.editor.extractGraphModel(p.documentElement,!0);if(null!=k){var q=function(a){null!=a&&
+"undefined"===typeof pako?"&xml="+encodeURIComponent(d):"&data="+encodeURIComponent(Graph.compress(d)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+d)).simulate(document,"_blank"))}});E.className="geBtn";E.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(d){a.spinner.stop();
+a.replaceFileData(y);a.hideDialog()},function(d){a.spinner.stop();a.editor.setStatus("");a.handleError(d,null!=d?mxResources.get("errorSavingFile"):null)})})});F.className="geBtn";F.setAttribute("disabled","disabled");var I=document.createElement("select");I.setAttribute("disabled","disabled");I.style.maxWidth="80px";I.style.position="relative";I.style.top="-2px";I.style.verticalAlign="bottom";I.style.marginRight="6px";I.style.display="none";var H=null;mxEvent.addListener(I,"change",function(a){null!=
+H&&(H(a),mxEvent.consume(a))});var K=mxUtils.button(mxResources.get("edit"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});K.className="geBtn";K.setAttribute("disabled","disabled");null!=c&&(K.style.display="none");var G=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(I.selectedIndex))});G.className="geBtn gePrimaryBtn";G.setAttribute("disabled",
+"disabled");null!=c&&(G.style.display="none",F.className="geBtn gePrimaryBtn");k=document.createElement("div");k.style.position="absolute";k.style.top="482px";k.style.width="640px";k.style.textAlign="right";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.padding="2px";L.style.border="none";L.style.left="199px";L.style.top="442px";var O=null;if(null!=e&&0<e.length){l.style.cursor="move";var J=document.createElement("table");J.style.border=
+"1px solid lightGray";J.style.borderCollapse="collapse";J.style.borderSpacing="0px";J.style.width="100%";var S=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(g=mxUtils.indexOf(a.pages,a.currentPage));for(var aa=e.length-1;0<=aa;aa--){var ca=function(b){var c=new Date(b.modifiedDate),f=null;if(0<=c.getTime()){var p=function(e){t.stop();var p=mxUtils.parseXml(e),k=a.editor.extractGraphModel(p.documentElement,!0);if(null!=k){var q=function(a){null!=a&&
(a=v(Editor.parseDiagramNode(a)));return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return a};I.style.display="none";I.innerHTML="";x=p;y=e;m=parseSelectFunction=null;n=0;if("mxfile"==k.nodeName){p=k.getElementsByTagName("diagram");m=[];for(e=0;e<p.length;e++)m.push(p[e]);n=Math.min(g,m.length-1);0<m.length&&q(m[n]);if(1<m.length)for(I.removeAttribute("disabled"),
-I.style.display="",e=0;e<m.length;e++)p=document.createElement("option"),mxUtils.write(p,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),p.setAttribute("value",e),e==n&&p.setAttribute("selected","selected"),I.appendChild(p);G=function(){try{var d=parseInt(I.value);n=g=d;q(m[d])}catch(X){I.value=g,a.handleError(X)}}}else v(k);e=b.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");D.innerHTML="";mxUtils.write(D,(null!=e?e+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());
-D.setAttribute("title",f.getAttribute("title"));A.removeAttribute("disabled");z.removeAttribute("disabled");B.removeAttribute("disabled");C.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),E.removeAttribute("disabled"),H.removeAttribute("disabled"),K.removeAttribute("disabled"));mxUtils.setOpacity(A,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(C,60)}else I.style.display="none",I.innerHTML="",D.innerHTML="",
+I.style.display="",e=0;e<m.length;e++)p=document.createElement("option"),mxUtils.write(p,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),p.setAttribute("value",e),e==n&&p.setAttribute("selected","selected"),I.appendChild(p);H=function(){try{var d=parseInt(I.value);n=g=d;q(m[d])}catch(X){I.value=g,a.handleError(X)}}}else v(k);e=b.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");D.innerHTML="";mxUtils.write(D,(null!=e?e+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());
+D.setAttribute("title",f.getAttribute("title"));A.removeAttribute("disabled");z.removeAttribute("disabled");B.removeAttribute("disabled");C.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),E.removeAttribute("disabled"),G.removeAttribute("disabled"),K.removeAttribute("disabled"));mxUtils.setOpacity(A,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(C,60)}else I.style.display="none",I.innerHTML="",D.innerHTML="",
mxUtils.write(D,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.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")):c.toDateString()===W?mxUtils.write(k,c.toLocaleTimeString()):mxUtils.write(k,c.toLocaleDateString()+" "+c.toLocaleTimeString());f.appendChild(k);f.setAttribute("title",c.toLocaleDateString()+
-" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){v!=b&&(u.stop(),null!=q&&(q.style.backgroundColor=""),v=b,q=f,q.style.backgroundColor="#ebf2f9",y=x=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),l.style.backgroundColor="#ffffff",d.getModel().clear(),F.setAttribute("disabled","disabled"),E.setAttribute("disabled",
-"disabled"),A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),mxUtils.setOpacity(A,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(C,20),u.spin(l),b.getXml(function(a){if(v==b)try{p(a)}catch(Q){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+Q.message)}},
-function(a){u.stop();I.style.display="none";I.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){H.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);S.appendChild(f)}return f}(e[aa]);null!=ca&&aa==e.length-1&&(O=ca)}J.appendChild(S);f.appendChild(J)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==
-a.dropbox&&t.constructor==window.DropboxFile?(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";L.appendChild(I);L.appendChild(A);L.appendChild(z);L.appendChild(C);L.appendChild(B);a.editor.cancelFirst?(k.appendChild(f),k.appendChild(E),
-k.appendChild(K),k.appendChild(F),k.appendChild(H)):(k.appendChild(E),k.appendChild(K),k.appendChild(F),k.appendChild(H),k.appendChild(f));b.appendChild(k);b.appendChild(L);b.appendChild(D);this.container=b},DraftDialog=function(a,e,c,b,k,f,l,d,g){var m=document.createElement("div"),n=document.createElement("div");n.style.marginTop="0px";n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.lineHeight="normal";mxUtils.write(n,e);m.appendChild(n);var p=document.createElement("select"),u=mxUtils.bind(this,
-function(){A=mxUtils.parseXml(g[p.value].data);z=a.editor.extractGraphModel(A.documentElement,!0);B=0;this.init()});if(null!=g){p.style.marginLeft="4px";for(e=0;e<g.length;e++){var t=document.createElement("option");t.setAttribute("value",e);var q=new Date(g[e].created),v=new Date(g[e].modified);mxUtils.write(t,q.toLocaleDateString()+" "+q.toLocaleTimeString()+" - "+(q.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());p.appendChild(t)}n.appendChild(p);mxEvent.addListener(p,
-"change",u)}null==c&&(c=g[0].data);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.marginTop="10px";x.style.left="40px";x.style.right="40px";x.style.top="46px";x.style.bottom="74px";x.style.overflow="hidden";mxEvent.disableContextMenu(x);m.appendChild(x);var y=new Graph(x);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var A=
+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){v!=b&&(t.stop(),null!=q&&(q.style.backgroundColor=""),v=b,q=f,q.style.backgroundColor="#ebf2f9",y=x=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),l.style.backgroundColor="#ffffff",d.getModel().clear(),F.setAttribute("disabled","disabled"),E.setAttribute("disabled",
+"disabled"),A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),mxUtils.setOpacity(A,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(C,20),t.spin(l),b.getXml(function(a){if(v==b)try{p(a)}catch(Q){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+Q.message)}},
+function(a){t.stop();I.style.display="none";I.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){G.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);S.appendChild(f)}return f}(e[aa]);null!=ca&&aa==e.length-1&&(O=ca)}J.appendChild(S);f.appendChild(J)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==
+a.dropbox&&u.constructor==window.DropboxFile?(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";L.appendChild(I);L.appendChild(A);L.appendChild(z);L.appendChild(C);L.appendChild(B);a.editor.cancelFirst?(k.appendChild(f),k.appendChild(E),
+k.appendChild(K),k.appendChild(F),k.appendChild(G)):(k.appendChild(E),k.appendChild(K),k.appendChild(F),k.appendChild(G),k.appendChild(f));b.appendChild(k);b.appendChild(L);b.appendChild(D);this.container=b},DraftDialog=function(a,e,c,b,k,f,l,d,g){var m=document.createElement("div"),n=document.createElement("div");n.style.marginTop="0px";n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.lineHeight="normal";mxUtils.write(n,e);m.appendChild(n);var p=document.createElement("select"),t=mxUtils.bind(this,
+function(){A=mxUtils.parseXml(g[p.value].data);z=a.editor.extractGraphModel(A.documentElement,!0);B=0;this.init()});if(null!=g){p.style.marginLeft="4px";for(e=0;e<g.length;e++){var u=document.createElement("option");u.setAttribute("value",e);var q=new Date(g[e].created),v=new Date(g[e].modified);mxUtils.write(u,q.toLocaleDateString()+" "+q.toLocaleTimeString()+" - "+(q.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());p.appendChild(u)}n.appendChild(p);mxEvent.addListener(p,
+"change",t)}null==c&&(c=g[0].data);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.marginTop="10px";x.style.left="40px";x.style.right="40px";x.style.top="46px";x.style.bottom="74px";x.style.overflow="hidden";mxEvent.disableContextMenu(x);m.appendChild(x);var y=new Graph(x);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var A=
mxUtils.parseXml(c),z=a.editor.extractGraphModel(A.documentElement,!0),B=0,C=null,D=y.getGlobalVariable;y.getGlobalVariable=function(a){return"page"==a&&null!=C&&null!=C[B]?C[B].getAttribute("name"):"pagenumber"==a?B+1:"pagecount"==a?null!=C?C.length:1:D.apply(this,arguments)};y.getLinkForCell=function(){return null};c=mxUtils.button("",function(){y.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin=
"2px";mxUtils.setOpacity(c,60);n=mxUtils.button("",function(){y.zoomOut()});n.className="geSprite geSprite-zoomout";n.setAttribute("title",mxResources.get("zoomOut"));n.style.outline="none";n.style.border="none";n.style.margin="2px";mxUtils.setOpacity(n,60);e=mxUtils.button("",function(){y.maxFitScale=8;y.fit(8);y.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);
-t=mxUtils.button("",function(){y.zoomActual();y.center()});t.className="geSprite geSprite-actualsize";t.setAttribute("title",mxResources.get("actualSize"));t.style.outline="none";t.style.border="none";t.style.margin="2px";mxUtils.setOpacity(t,60);l=mxUtils.button(l||mxResources.get("discard"),function(){k.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,
-u()):a.hideDialog(!0))})])});l.className="geBtn";var E=document.createElement("select");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[p.value])});f.className="geBtn gePrimaryBtn";q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.right="40px";q.style.textAlign="right";v=document.createElement("div");
+u=mxUtils.button("",function(){y.zoomActual();y.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin="2px";mxUtils.setOpacity(u,60);l=mxUtils.button(l||mxResources.get("discard"),function(){k.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,
+t()):a.hideDialog(!0))})])});l.className="geBtn";var E=document.createElement("select");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[p.value])});f.className="geBtn gePrimaryBtn";q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.right="40px";q.style.textAlign="right";v=document.createElement("div");
v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var d=a.getAttribute("background");if(null==d||""==d||d==mxConstants.NONE)d="dark"==uiTheme?"transparent":"#ffffff";x.style.backgroundColor=d;(new mxCodec(a.ownerDocument)).decode(a,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}return a}function d(d){null!=d&&(d=a(Editor.parseDiagramNode(d)));
return d}mxEvent.addListener(E,"change",function(a){B=parseInt(E.value);d(C[B]);mxEvent.consume(a)});if("mxfile"==z.nodeName){var b=z.getElementsByTagName("diagram");C=[];for(var c=0;c<b.length;c++)C.push(b[c]);0<C.length&&d(C[B]);E.innerHTML="";if(1<C.length)for(E.style.display="",c=0;c<C.length;c++)b=document.createElement("option"),mxUtils.write(b,C[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),b.setAttribute("value",c),c==B&&b.setAttribute("selected","selected"),E.appendChild(b);
-else E.style.display="none"}else a(z)};v.appendChild(E);v.appendChild(c);v.appendChild(n);v.appendChild(t);v.appendChild(e);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");a.editor.cancelFirst?(q.appendChild(c),null!=d&&q.appendChild(d),q.appendChild(l),q.appendChild(f)):(q.appendChild(f),q.appendChild(l),null!=d&&q.appendChild(d),q.appendChild(c));m.appendChild(q);
-m.appendChild(v);this.container=m},FindWindow=function(a,e,c,b,k){function f(a,d,b){if("object"===typeof d.value&&null!=d.value.attributes){d=d.value.attributes;for(var c=0;c<d.length;c++)if("label"!=d[c].nodeName){var e=mxUtils.trim(d[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&e.substring(0,b.length)===b||null!=a&&a.test(e))return!0}}return!1}function l(d){var b=g.model.getDescendants(g.model.getRoot()),c=t.value.toLowerCase(),e=q.checked?new RegExp(c):null,
-k=null;m!=c&&(m=c,n=null,p=!1);var u=null==n;if(0<c.length){if(p){p=!1;for(var z,G=0;G<a.pages.length;G++)if(a.currentPage==a.pages[G]){z=G;break}d=(z+1)%a.pages.length;n=null;do p=!1,b=a.pages[d],g=a.createTemporaryGraph(g.getStylesheet()),a.updatePageRoot(b),g.model.setRoot(b.root),d=(d+1)%a.pages.length;while(!l(!0)&&d!=z);n&&(n=null,a.selectPage(b));p=!1;g=a.editor.graph;return l(!0)}for(G=0;G<b.length;G++){z=g.view.getState(b[G]);if(null!=z&&null!=z.cell.value&&(u||null==k)&&(g.model.isVertex(z.cell)||
-g.model.isEdge(z.cell))&&(g.isHtmlLabel(z.cell)?(y.innerHTML=g.sanitizeHtml(g.getLabel(z.cell)),label=mxUtils.extractTextWithWhitespace([y])):label=g.getLabel(z.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==e&&(label.substring(0,c.length)===c||f(e,z.cell,c))||null!=e&&(e.test(label)||f(e,z.cell,c))))if(u){k=z;break}else null==k&&(k=z);u=u||z==n}}if(null!=k){if(G==b.length&&x.checked)return n=null,p=!0,l(!0);n=k;g.scrollCellToVisible(n.cell);g.isEnabled()?
-g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!d&&x.checked)return p=!0,l(!0);g.isEnabled()&&g.clearSelection()}return 0==c.length||null!=k}var d=a.actions.get("find"),g=a.editor.graph,m=null,n=null,p=!1,u=document.createElement("div");u.style.userSelect="none";u.style.overflow="hidden";u.style.padding="10px";u.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";u.appendChild(t);mxUtils.br(u);var q=document.createElement("input");q.setAttribute("id","geFindWinRegExChck");q.setAttribute("type","checkbox");q.style.marginRight="4px";u.appendChild(q);var v=document.createElement("label");v.setAttribute("for","geFindWinRegExChck");u.appendChild(v);mxUtils.write(v,mxResources.get("regularExpression"));u.appendChild(v);v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");
-v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";u.appendChild(v);mxUtils.br(u);var x=document.createElement("input");x.setAttribute("id","geFindWinAllPagesChck");x.setAttribute("type","checkbox");x.style.marginRight="4px";u.appendChild(x);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");u.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));u.appendChild(v);var y=document.createElement("div");mxUtils.br(u);v=mxUtils.button(mxResources.get("reset"),
-function(){t.value="";t.style.backgroundColor="";m=n=null;p=!1;t.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.marginLeft=(b-20-156)/2+"px";v.className="geBtn";u.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{t.style.backgroundColor=l()?"":"#ffcfcf"}catch(z){a.handleError(z)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";u.appendChild(v);
-mxEvent.addListener(t,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)d.funct();else if(m!=t.value.toLowerCase()||13==a.keyCode)try{t.style.backgroundColor=l()?"":"#ffcfcf"}catch(B){t.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(u,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(d.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),u,e,c,b,k,!0,!0);this.window.destroyOnClose=
-!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?x.removeAttribute("disabled"):(x.checked=!1,x.setAttribute("disabled","disabled"))):g.container.focus()}));this.window.setLocation=function(a,
+else E.style.display="none"}else a(z)};v.appendChild(E);v.appendChild(c);v.appendChild(n);v.appendChild(u);v.appendChild(e);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");a.editor.cancelFirst?(q.appendChild(c),null!=d&&q.appendChild(d),q.appendChild(l),q.appendChild(f)):(q.appendChild(f),q.appendChild(l),null!=d&&q.appendChild(d),q.appendChild(c));m.appendChild(q);
+m.appendChild(v);this.container=m},FindWindow=function(a,e,c,b,k){function f(a,d,b){if("object"===typeof d.value&&null!=d.value.attributes){d=d.value.attributes;for(var c=0;c<d.length;c++)if("label"!=d[c].nodeName){var e=mxUtils.trim(d[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&e.substring(0,b.length)===b||null!=a&&a.test(e))return!0}}return!1}function l(d){var b=g.model.getDescendants(g.model.getRoot()),c=u.value.toLowerCase(),e=q.checked?new RegExp(c):null,
+k=null;m!=c&&(m=c,n=null,p=!1);var t=null==n;if(0<c.length){if(p){p=!1;for(var z,H=0;H<a.pages.length;H++)if(a.currentPage==a.pages[H]){z=H;break}d=(z+1)%a.pages.length;n=null;do p=!1,b=a.pages[d],g=a.createTemporaryGraph(g.getStylesheet()),a.updatePageRoot(b),g.model.setRoot(b.root),d=(d+1)%a.pages.length;while(!l(!0)&&d!=z);n&&(n=null,a.selectPage(b));p=!1;g=a.editor.graph;return l(!0)}for(H=0;H<b.length;H++){z=g.view.getState(b[H]);if(null!=z&&null!=z.cell.value&&(t||null==k)&&(g.model.isVertex(z.cell)||
+g.model.isEdge(z.cell))&&(g.isHtmlLabel(z.cell)?(y.innerHTML=g.sanitizeHtml(g.getLabel(z.cell)),label=mxUtils.extractTextWithWhitespace([y])):label=g.getLabel(z.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==e&&(label.substring(0,c.length)===c||f(e,z.cell,c))||null!=e&&(e.test(label)||f(e,z.cell,c))))if(t){k=z;break}else null==k&&(k=z);t=t||z==n}}if(null!=k){if(H==b.length&&x.checked)return n=null,p=!0,l(!0);n=k;g.scrollCellToVisible(n.cell);g.isEnabled()?
+g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!d&&x.checked)return p=!0,l(!0);g.isEnabled()&&g.clearSelection()}return 0==c.length||null!=k}var d=a.actions.get("find"),g=a.editor.graph,m=null,n=null,p=!1,t=document.createElement("div");t.style.userSelect="none";t.style.overflow="hidden";t.style.padding="10px";t.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom=
+"6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";t.appendChild(u);mxUtils.br(t);var q=document.createElement("input");q.setAttribute("id","geFindWinRegExChck");q.setAttribute("type","checkbox");q.style.marginRight="4px";t.appendChild(q);var v=document.createElement("label");v.setAttribute("for","geFindWinRegExChck");t.appendChild(v);mxUtils.write(v,mxResources.get("regularExpression"));t.appendChild(v);v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");
+v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";t.appendChild(v);mxUtils.br(t);var x=document.createElement("input");x.setAttribute("id","geFindWinAllPagesChck");x.setAttribute("type","checkbox");x.style.marginRight="4px";t.appendChild(x);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");t.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));t.appendChild(v);var y=document.createElement("div");mxUtils.br(t);v=mxUtils.button(mxResources.get("reset"),
+function(){u.value="";u.style.backgroundColor="";m=n=null;p=!1;u.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.marginLeft=(b-20-156)/2+"px";v.className="geBtn";t.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=l()?"":"#ffcfcf"}catch(z){a.handleError(z)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";t.appendChild(v);
+mxEvent.addListener(u,"keyup",function(a){if(91==a.keyCode||93==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)d.funct();else if(m!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=l()?"":"#ffcfcf"}catch(B){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(t,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(d.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),t,e,c,b,k,!0,!0);this.window.destroyOnClose=
+!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?x.removeAttribute("disabled"):(x.checked=!1,x.setAttribute("disabled","disabled"))):g.container.focus()}));this.window.setLocation=function(a,
d){var b=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));d=Math.max(0,Math.min(d,b-this.table.clientHeight-48));this.getX()==a&&this.getY()==d||mxWindow.prototype.setLocation.apply(this,arguments)};var A=mxUtils.bind(this,function(){var a=this.window.getX(),d=this.window.getY();this.window.setLocation(a,d)});mxEvent.addListener(window,
"resize",A);this.destroy=function(){mxEvent.removeListener(window,"resize",A);this.window.destroy()}},FreehandWindow=function(a,e,c,b,k){var f=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var l=mxUtils.button(mxResources.get("startDrawing"),function(){f.freehand.isDrawing()&&f.freehand.stopDrawing();f.freehand.startDrawing()});l.setAttribute("title",mxResources.get("startDrawing"));l.style.marginTop="8px";l.style.marginRight=
"4px";l.style.width="160px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";l.style.textAlign="center";l.className="geBtn gePrimaryBtn";a.appendChild(l);var d=l.cloneNode(!1);mxUtils.write(d,mxResources.get("stopDrawing"));d.setAttribute("title",mxResources.get("stopDrawing"));d.style.marginTop="4px";mxEvent.addListener(d,"click",function(){f.freehand.stopDrawing()});a.appendChild(d);this.window=new mxWindow(mxResources.get("freehand"),a,e,c,b,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
@@ -9291,61 +9292,61 @@ d.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils
d={title:a.getResource(l.title),entries:[]},g=0;g<l.entries.length;g++){var m=l.entries[g];d.entries.push({id:m.id,title:a.getResource(m.title),desc:a.getResource(m.desc),image:m.preview})}k.push(d)}for(f=0;f<c.length;f++)if(null==a.sidebar.enabledLibraries)k.push(c[f]);else{d={title:c[f].title,entries:[]};for(g=0;g<c[f].entries.length;g++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[f].entries[g].id)&&d.entries.push(c[f].entries[g]);0<d.entries.length&&k.push(d)}c=k;if(e){g=mxUtils.bind(this,
function(d){for(var b=0;b<d.length;b++)(function(d){var c=q.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,d.title);n.appendChild(c);for(var e=0;e<d.entries.length;e++)(function(d){var c=q.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.setAttribute("title",d.title+" ("+d.id+")");var g=
document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(d.id);g.defaultChecked=g.checked;c.appendChild(g);mxUtils.write(c," "+d.title);n.appendChild(c);var m=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=d.desc){var b=document.createElement("pre");b.style.boxSizing="border-box";b.style.fontFamily="inherit";b.style.margin="20px";b.style.right="0px";
-b.style.textAlign="left";mxUtils.write(b,d.desc);p.appendChild(b)}null!=d.imageCallback?d.imageCallback(p):null!=d.image?p.innerHTML+='<img border="0" src="'+d.image+'"/>':null==d.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=u&&(u.style.backgroundColor="");u=c;u.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",m);mxEvent.addListener(c,"dblclick",function(a){g.checked=
-!g.checked;mxEvent.consume(a)});t.push(function(){return g.checked?d.id:null});0==b&&0==e&&m()})(d.entries[e])})(d[b])});f=document.createElement("div");f.className="geDialogTitle";mxUtils.write(f,mxResources.get("shapes"));f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.lineHeight="40px";f.style.height="40px";f.style.right="0px";mxClient.IS_QUIRKS&&(f.style.width="718px");var n=document.createElement("div"),p=document.createElement("div");n.style.position="absolute";n.style.top=
+b.style.textAlign="left";mxUtils.write(b,d.desc);p.appendChild(b)}null!=d.imageCallback?d.imageCallback(p):null!=d.image?p.innerHTML+='<img border="0" src="'+d.image+'"/>':null==d.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=t&&(t.style.backgroundColor="");t=c;t.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",m);mxEvent.addListener(c,"dblclick",function(a){g.checked=
+!g.checked;mxEvent.consume(a)});u.push(function(){return g.checked?d.id:null});0==b&&0==e&&m()})(d.entries[e])})(d[b])});f=document.createElement("div");f.className="geDialogTitle";mxUtils.write(f,mxResources.get("shapes"));f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.lineHeight="40px";f.style.height="40px";f.style.right="0px";mxClient.IS_QUIRKS&&(f.style.width="718px");var n=document.createElement("div"),p=document.createElement("div");n.style.position="absolute";n.style.top=
"40px";n.style.left="0px";n.style.width="202px";n.style.bottom="60px";n.style.overflow="auto";mxClient.IS_QUIRKS&&(n.style.height="437px",n.style.marginTop="1px");p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";mxClient.IS_QUIRKS&&(p.style.width=parseInt(f.style.width)-202+"px",p.style.height=n.style.height,p.style.marginTop=n.style.marginTop);
-var u=null,t=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";g(c);b.style.padding="30px";b.appendChild(f);b.appendChild(n);b.appendChild(p);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=f.style.width,c.style.paddingTop=
+var t=null,u=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";g(c);b.style.padding="30px";b.appendChild(f);b.appendChild(n);b.appendChild(p);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=f.style.width,c.style.paddingTop=
"12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=document.createElement("span"),f.style.paddingRight="20px",f.appendChild(v),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(f.style.position="relative",f.style.top="-6px"),c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var d=[],b=0;b<t.length;b++){var c=t[b].apply(this,arguments);null!=c&&d.push(c)}a.sidebar.showEntries(d.join(";"),v.checked,!0)});g.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";g=document.createElement("tr");x.style.width="100%";e=document.createElement("td");var k=document.createElement("td"),
+function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var d=[],b=0;b<u.length;b++){var c=u[b].apply(this,arguments);null!=c&&d.push(c)}a.sidebar.showEntries(d.join(";"),v.checked,!0)});g.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";g=document.createElement("tr");x.style.width="100%";e=document.createElement("td");var k=document.createElement("td"),
l=document.createElement("td"),y=mxUtils.bind(this,function(d,b,c){var e=document.createElement("input");e.type="checkbox";x.appendChild(e);e.checked=a.sidebar.isEntryVisible(c);var g=document.createElement("span");mxUtils.write(g,b);b=document.createElement("div");b.style.display="block";b.appendChild(e);b.appendChild(g);mxEvent.addListener(g,"click",function(a){e.checked=!e.checked;mxEvent.consume(a)});d.appendChild(b);return function(){return e.checked?c:null}});g.appendChild(e);g.appendChild(k);
-g.appendChild(l);f.appendChild(g);x.appendChild(f);for(var t=[],A=0,f=0;f<c.length;f++)for(g=0;g<c[f].entries.length;g++)A++;for(var z=[e,k,l],B=0,f=0;f<c.length;f++)(function(a){for(var d=0;d<a.entries.length;d++){var b=a.entries[d];t.push(y(z[Math.floor(B/(A/3))],b.title,b.id));B++}})(c[f]);b.appendChild(x);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=
-!0,c.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var d=["search"],b=0;b<t.length;b++){var c=t[b].apply(this,arguments);null!=c&&d.push(c)}a.sidebar.showEntries(0<d.length?
+g.appendChild(l);f.appendChild(g);x.appendChild(f);for(var u=[],A=0,f=0;f<c.length;f++)for(g=0;g<c[f].entries.length;g++)A++;for(var z=[e,k,l],B=0,f=0;f<c.length;f++)(function(a){for(var d=0;d<a.entries.length;d++){var b=a.entries[d];u.push(y(z[Math.floor(B/(A/3))],b.title,b.id));B++}})(c[f]);b.appendChild(x);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=
+!0,c.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var d=["search"],b=0;b<u.length;b++){var c=u[b].apply(this,arguments);null!=c&&d.push(c)}a.sidebar.showEntries(0<d.length?
d.join(";"):"",v.checked);a.hideDialog()});g.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(g)):(c.appendChild(g),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a,e,c){function b(){if(0==l.length)f.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{f.innerHTML="";for(var d=0;d<l.length;d++){var e=document.createElement("span");e.style.whiteSpace=
"nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete";g.style.position="relative";g.style.cursor="pointer";g.style.top="5px";g.style.marginRight="4px";g.style.display="inline-block";e.appendChild(g);mxUtils.write(e,l[d]);f.appendChild(e);mxUtils.br(f);mxEvent.addListener(g,"click",function(d){return function(){a.confirm(mxResources.get("delete")+' "'+l[d]+'"?',function(){null!=c&&c(l[d]);l.splice(d,1);b()})}}(d))}}}var k=document.createElement("div"),f=document.createElement("div");
f.style.height="120px";f.style.overflow="auto";var l=mxSettings.getPlugins().slice();k.appendChild(f);b();var d=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(a){a&&0>mxUtils.indexOf(l,a)&&l.push(a);b()})}:function(){var d="",c=urlParams.p;if(null!=c&&0<c.length){for(var e=c.split(";"),c=0;c<e.length;c++){var g=App.pluginRegistry[e[c]];null!=g&&(d+=g+";")}";"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1))}d=new FilenameDialog(a,d,mxResources.get("add"),function(a){if(null!=
a&&0<a.length){e=a.split(";");for(a=0;a<e.length;a++){var d=e[a],c=App.pluginRegistry[d];null!=c&&(d=c);0<d.length&&0>mxUtils.indexOf(l,d)&&l.push(d)}b()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(d.container,300,80,!0,!0);d.init()});d.className="geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(l);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});
m.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");n.appendChild(p);a.editor.cancelFirst?(n.appendChild(g),n.appendChild(d),n.appendChild(m)):(n.appendChild(d),n.appendChild(m),n.appendChild(g));k.appendChild(n);this.container=
k},CropImageDialog=function(a,e,c){function b(a){null!=l&&l.destroy();l=a?new Croppie(f,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(f,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});l.bind({url:e})}var k=document.createElement("div"),f=document.createElement("div");f.style.width="300px";f.style.height="300px";k.appendChild(f);var l=null;this.init=function(){b()};
-var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("id","croppieCircle");d.style.margin="5px";k.appendChild(d);var g=document.createElement("label");g.setAttribute("for","croppieCircle");mxUtils.write(g,mxResources.get("circle"));k.appendChild(g);var m,n,p,u,g=document.createElement("div");m=document.createElement("button");n=document.createElement("button");g.appendChild(m);g.appendChild(n);p=document.createElement("i");u=document.createElement("i");m.appendChild(p);
-n.appendChild(u);g.className="cr-rotate-controls";g.style["float"]="right";g.style.position="inherit";m.className="cr-rotate-l";n.className="cr-rotate-r";k.appendChild(g);m.addEventListener("click",function(){l.rotate(-90)});n.addEventListener("click",function(){l.rotate(90)});mxEvent.addListener(d,"change",function(){b(this.checked)});d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){l.result({type:"base64",
+var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("id","croppieCircle");d.style.margin="5px";k.appendChild(d);var g=document.createElement("label");g.setAttribute("for","croppieCircle");mxUtils.write(g,mxResources.get("circle"));k.appendChild(g);var m,n,p,t,g=document.createElement("div");m=document.createElement("button");n=document.createElement("button");g.appendChild(m);g.appendChild(n);p=document.createElement("i");t=document.createElement("i");m.appendChild(p);
+n.appendChild(t);g.className="cr-rotate-controls";g.style["float"]="right";g.style.position="inherit";m.className="cr-rotate-l";n.className="cr-rotate-r";k.appendChild(g);m.addEventListener("click",function(){l.rotate(-90)});n.addEventListener("click",function(){l.rotate(90)});mxEvent.addListener(d,"change",function(){b(this.checked)});d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){l.result({type:"base64",
size:"original"}).then(function(d){c(d);a.hideDialog()})});g.className="geBtn gePrimaryBtn";m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";a.editor.cancelFirst?(m.appendChild(d),m.appendChild(g)):(m.appendChild(g),m.appendChild(d));k.appendChild(m);this.container=k},EditGeometryDialog=function(a,e){var c=a.editor.graph,b=1==e.length?c.getCellGeometry(e[0]):null,k=document.createElement("div"),f=document.createElement("table"),l=document.createElement("tbody"),d=
document.createElement("tr"),g=document.createElement("td"),m=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(g,mxResources.get("relative")+":");var n=document.createElement("input");n.setAttribute("type","checkbox");null!=b&&b.relative&&(n.setAttribute("checked","checked"),n.defaultChecked=!0);this.init=function(){n.focus()};m.appendChild(n);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");
-mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.x:"";m.appendChild(p);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b?b.y:"";m.appendChild(u);d.appendChild(g);
-d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("dx")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b&&null!=b.offset?b.offset.x:"";m.appendChild(t);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("dy")+
+mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.x:"";m.appendChild(p);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b?b.y:"";m.appendChild(t);d.appendChild(g);
+d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";m.appendChild(u);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("dy")+
":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b&&null!=b.offset?b.offset.y:"";m.appendChild(q);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.width:"";m.appendChild(v);d.appendChild(g);d.appendChild(m);
l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=b?b.height:"";m.appendChild(x);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("rotation")+":");var y=document.createElement("input");
y.setAttribute("type","text");y.style.width="100px";y.value=1==e.length?mxUtils.getValue(c.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(y);d.appendChild(g);d.appendChild(m);l.appendChild(d);f.appendChild(l);k.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var d=0;d<e.length;d++){var b=c.getCellGeometry(e[d]);null!=
-b&&(b=b.clone(),c.isCellMovable(e[d])&&(b.relative=n.checked,0<mxUtils.trim(p.value).length&&(b.x=Number(p.value)),0<mxUtils.trim(u.value).length&&(b.y=Number(u.value)),0<mxUtils.trim(t.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.x=Number(t.value)),0<mxUtils.trim(q.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.y=Number(q.value))),c.isCellResizable(e[d])&&(0<mxUtils.trim(v.value).length&&(b.width=Number(v.value)),0<mxUtils.trim(x.value).length&&(b.height=Number(x.value))),
+b&&(b=b.clone(),c.isCellMovable(e[d])&&(b.relative=n.checked,0<mxUtils.trim(p.value).length&&(b.x=Number(p.value)),0<mxUtils.trim(t.value).length&&(b.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.x=Number(u.value)),0<mxUtils.trim(q.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.y=Number(q.value))),c.isCellResizable(e[d])&&(0<mxUtils.trim(v.value).length&&(b.width=Number(v.value)),0<mxUtils.trim(x.value).length&&(b.height=Number(x.value))),
c.getModel().setGeometry(e[d],b));0<mxUtils.trim(y.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[e[d]])}}finally{c.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&A.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(A)):(f.appendChild(A),f.appendChild(b));k.appendChild(f);this.container=k},LibraryDialog=function(a,
-e,c,b,k,f){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var d=null;if(null!=a)for(var b=t.firstChild,d=0;null!=b&&b!=a;)b=b.nextSibling,d++;return d}function d(b,c,e,g,m,f,p,k,u){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=p||null==v[b]){var G=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow="ellipsis";mxUtils.write(J,null!=E.title&&0<E.title.length?E.title:
-mxResources.get("untitled"));J.style.color=null==E.title||0==E.title.length?"#d0d0d0":""};t.style.backgroundImage="";q.style.display="none";var H=m,K=f;if(m>a.maxImageSize||f>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,f));m*=C;f*=C}H>K?(K=Math.round(100*K/H),H=100):(H=Math.round(100*H/K),K=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="relative";
-y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");if(null!=b){var L=document.createElement("img");L.setAttribute("src",z.convert(b));L.style.width=H+"px";L.style.height=K+"px";L.style.margin="10px";L.style.paddingBottom=Math.floor((100-K)/2)+"px";L.style.paddingLeft=Math.floor((100-H)/2)+"px";y.appendChild(L)}else if(null!=p){var O=a.stringToCells(Graph.decompress(p.xml));0<O.length&&(a.sidebar.createThumb(O,100,100,y,null,!0,!1),y.firstChild.style.display=
+e,c,b,k,f){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var d=null;if(null!=a)for(var b=u.firstChild,d=0;null!=b&&b!=a;)b=b.nextSibling,d++;return d}function d(b,c,e,g,m,f,p,k,t){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=p||null==v[b]){var H=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow="ellipsis";mxUtils.write(J,null!=E.title&&0<E.title.length?E.title:
+mxResources.get("untitled"));J.style.color=null==E.title||0==E.title.length?"#d0d0d0":""};u.style.backgroundImage="";q.style.display="none";var G=m,K=f;if(m>a.maxImageSize||f>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,f));m*=C;f*=C}G>K?(K=Math.round(100*K/G),G=100):(G=Math.round(100*G/K),K=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="relative";
+y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");if(null!=b){var L=document.createElement("img");L.setAttribute("src",z.convert(b));L.style.width=G+"px";L.style.height=K+"px";L.style.margin="10px";L.style.paddingBottom=Math.floor((100-K)/2)+"px";L.style.paddingLeft=Math.floor((100-G)/2)+"px";y.appendChild(L)}else if(null!=p){var O=a.stringToCells(Graph.decompress(p.xml));0<O.length&&(a.sidebar.createThumb(O,100,100,y,null,!0,!1),y.firstChild.style.display=
mxClient.IS_QUIRKS?"inline":"inline-block",y.firstChild.style.cursor="")}var D=document.createElement("img");D.setAttribute("src",Editor.closeImage);D.setAttribute("border","0");D.setAttribute("title",mxResources.get("delete"));D.setAttribute("align","top");D.style.paddingTop="4px";D.style.position="absolute";D.style.marginLeft="-12px";D.style.zIndex="1";D.style.cursor="pointer";mxEvent.addListener(D,"dragstart",function(a){mxEvent.consume(a)});(function(a,d,b){mxEvent.addListener(D,"click",function(c){v[d]=
-null;for(var e=0;e<n.length;e++)if(null!=n[e].data&&n[e].data==d||null!=n[e].xml&&null!=b&&n[e].xml==b.xml){n.splice(e,1);break}y.parentNode.removeChild(a);0==n.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(c)});mxEvent.addListener(D,"dblclick",function(a){mxEvent.consume(a)})})(y,b,p);y.appendChild(D);y.style.marginBottom="30px";var J=document.createElement("div");J.style.position="absolute";J.style.boxSizing="border-box";J.style.bottom=
-"-18px";J.style.left="10px";J.style.right="10px";J.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var E=null;null!=b?(E={data:b,w:m,h:f,title:u},null!=k&&(E.aspect=k),v[b]=L,n.push(E)):null!=p&&(p.aspect="fixed",n.push(p),E=p);mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});G();y.appendChild(J);mxEvent.addListener(J,"mousedown",function(a){"true"!=J.getAttribute("contentEditable")&&
-mxEvent.consume(a)});O=function(d){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,E.title||"",mxResources.get("ok"),function(a){null!=a&&(E.title=a,G())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(d)}else if("true"!=J.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==E.title||0==E.title.length)J.innerHTML="";J.style.textOverflow="";J.style.whiteSpace=
-"";J.style.cursor="text";J.style.color="";J.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(J.style,"user-select","text");J.focus();document.execCommand("selectAll",!1,null);A=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";E.title=J.innerHTML;G()};mxEvent.consume(d)}};mxEvent.addListener(J,"click",O);mxEvent.addListener(y,"dblclick",O);t.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==b&&null!=p&&(D.style.visibility="hidden",J.style.visibility=
+null;for(var e=0;e<n.length;e++)if(null!=n[e].data&&n[e].data==d||null!=n[e].xml&&null!=b&&n[e].xml==b.xml){n.splice(e,1);break}y.parentNode.removeChild(a);0==n.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(c)});mxEvent.addListener(D,"dblclick",function(a){mxEvent.consume(a)})})(y,b,p);y.appendChild(D);y.style.marginBottom="30px";var J=document.createElement("div");J.style.position="absolute";J.style.boxSizing="border-box";J.style.bottom=
+"-18px";J.style.left="10px";J.style.right="10px";J.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var E=null;null!=b?(E={data:b,w:m,h:f,title:t},null!=k&&(E.aspect=k),v[b]=L,n.push(E)):null!=p&&(p.aspect="fixed",n.push(p),E=p);mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});H();y.appendChild(J);mxEvent.addListener(J,"mousedown",function(a){"true"!=J.getAttribute("contentEditable")&&
+mxEvent.consume(a)});O=function(d){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,E.title||"",mxResources.get("ok"),function(a){null!=a&&(E.title=a,H())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(d)}else if("true"!=J.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==E.title||0==E.title.length)J.innerHTML="";J.style.textOverflow="";J.style.whiteSpace=
+"";J.style.cursor="text";J.style.color="";J.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(J.style,"user-select","text");J.focus();document.execCommand("selectAll",!1,null);A=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";E.title=J.innerHTML;H()};mxEvent.consume(d)}};mxEvent.addListener(J,"click",O);mxEvent.addListener(y,"dblclick",O);u.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==b&&null!=p&&(D.style.visibility="hidden",J.style.visibility=
"hidden");mxClient.IS_FF&&null!=p.xml&&a.dataTransfer.setData("Text",p.xml);x=l(a);mxClient.IS_GC&&(y.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(y.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(y,30);D.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(y,"dragend",function(a){"hidden"==D.style.visibility&&(D.style.visibility="",J.style.visibility="");x=null;mxUtils.setOpacity(y,100);mxUtils.setPrefixedStyle(y.style,"transform",null)})}else B||
-(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(H=mxUtils.parseXml(b),"mxlibrary"==H.documentElement.nodeName){K=JSON.parse(mxUtils.getTextContent(H.documentElement));if(null!=K&&0<K.length)for(var F=0;F<K.length;F++)null!=K[F].xml?d(null,null,0,0,0,0,K[F]):d(K[F].data,null,0,0,K[F].w,K[F].h,null,"fixed",K[F].title);m=!0}else if("mxfile"==H.documentElement.nodeName){for(var I=H.documentElement.getElementsByTagName("diagram"),F=0;F<I.length;F++){var K=mxUtils.getTextContent(I[F]),
-O=a.stringToCells(Graph.decompress(K)),M=a.editor.graph.getBoundingBoxFromGeometry(O);d(null,null,0,0,0,0,{xml:K,w:M.width,h:M.height})}m=!0}}catch(ga){}m||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ga){}return null}function g(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();B=!1;y=l(b);if(null!=x)null!=y&&y<t.children.length?(n.splice(y>x?y-1:y,0,n.splice(x,1)[0]),
-t.insertBefore(t.children[x],t.children[y])):(n.push(n.splice(x,1)[0]),t.appendChild(t.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){d(c,null,0,0,a.width,a.height);t.scrollTop=
-t.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];c=document.createElement("div");c.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";c.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var u=document.createElement("input");u.setAttribute("value",e);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width="500px";null==k||k.isRenamable()||u.setAttribute("disabled",
-"true");this.init=function(){if(null==k||k.isRenamable())u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};p.appendChild(u);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==
-n.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));c.appendChild(q);var v={},x=null,y=null,A=null;e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(a))};mxEvent.addListener(t,
-"mousedown",e);mxEvent.addListener(t,"pointerdown",e);mxEvent.addListener(t,"touchstart",e);var z=new mxUrlConverter,B=!1;if(null!=b)for(e=0;e<b.length;e++)p=b[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(t,"dragleave",function(a){q.style.cursor="";for(var d=mxEvent.getSource(a);null!=d;){if(d==t||d==q){a.stopPropagation();a.preventDefault();break}d=d.parentNode}});var C=function(b){return function(c,e,g,m,f,n,p,k,l){null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name))?
-a.importVisio(l,mxUtils.bind(this,function(a){d(a,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=l&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,l.name)?a.parseFile(l,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(d(c.responseText,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(d(c,e,
-g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",g);mxEvent.addListener(t,"drop",m);mxEvent.addListener(q,"dragover",g);mxEvent.addListener(q,"drop",m);c.appendChild(t);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=!0,a.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(G=mxUtils.parseXml(b),"mxlibrary"==G.documentElement.nodeName){K=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=K&&0<K.length)for(var F=0;F<K.length;F++)null!=K[F].xml?d(null,null,0,0,0,0,K[F]):d(K[F].data,null,0,0,K[F].w,K[F].h,null,"fixed",K[F].title);m=!0}else if("mxfile"==G.documentElement.nodeName){for(var I=G.documentElement.getElementsByTagName("diagram"),F=0;F<I.length;F++){var K=mxUtils.getTextContent(I[F]),
+O=a.stringToCells(Graph.decompress(K)),M=a.editor.graph.getBoundingBoxFromGeometry(O);d(null,null,0,0,0,0,{xml:K,w:M.width,h:M.height})}m=!0}}catch(ga){}m||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ga){}return null}function g(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();B=!1;y=l(b);if(null!=x)null!=y&&y<u.children.length?(n.splice(y>x?y-1:y,0,n.splice(x,1)[0]),
+u.insertBefore(u.children[x],u.children[y])):(n.push(n.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){d(c,null,0,0,a.width,a.height);u.scrollTop=
+u.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];c=document.createElement("div");c.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";c.appendChild(p);mxUtils.write(p,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==k||k.isRenamable()||t.setAttribute("disabled",
+"true");this.init=function(){if(null==k||k.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};p.appendChild(t);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==
+n.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));c.appendChild(q);var v={},x=null,y=null,A=null;e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(a))};mxEvent.addListener(u,
+"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var z=new mxUrlConverter,B=!1;if(null!=b)for(e=0;e<b.length;e++)p=b[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(u,"dragleave",function(a){q.style.cursor="";for(var d=mxEvent.getSource(a);null!=d;){if(d==u||d==q){a.stopPropagation();a.preventDefault();break}d=d.parentNode}});var C=function(b){return function(c,e,g,m,f,n,p,k,l){null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name))?
+a.importVisio(l,mxUtils.bind(this,function(a){d(a,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=l&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,l.name)?a.parseFile(l,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(d(c.responseText,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(d(c,e,
+g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",g);mxEvent.addListener(u,"drop",m);mxEvent.addListener(q,"dragover",g);mxEvent.addListener(q,"drop",m);c.appendChild(u);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);"draw.io"!=a.getServiceName()||null==k||k.constructor!=DriveLibrary&&k.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){a.spinner.spin(document.body,mxResources.get("loading"))&&k.getPublicUrl(function(d){a.spinner.stop();if(null!=d){var b=a.getSearch("create title mode url drive splash state clibs ui".split(" ")),b=b+((0==b.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(d));d=new EmbedDialog(a,window.location.protocol+"//"+window.location.host+
"/"+b,null,null,null,null,"Check out the library I made using @drawio");a.showDialog(d.container,440,240,!0);d.init()}else k.constructor==DriveLibrary?a.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){a.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):a.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",b.appendChild(p));p=mxUtils.button(mxResources.get("export"),
-function(){var d=a.createLibraryDataFromImages(n),b=u.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(d))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";b.appendChild(p);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");D.setAttribute("multiple","multiple");
-D.setAttribute("type","file");mxEvent.addListener(D,"change",function(d){B=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,b,c,e,g,m,f,n,p){null!=D.files&&(C(d)(a,b,c,e,g,m,f,n,p),D.type="",D.type="file",D.value="")});t.scrollTop=t.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}p=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);a.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";b.appendChild(p)}p=
-mxUtils.button(mxResources.get("addImages"),function(){null!=A&&(A(),A=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var e=a.indexOf(",");0<e&&(a=a.substring(0,e)+";base64,"+a.substring(e+1))}d(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";b.appendChild(p);this.saveBtnClickHandler=function(d,b,c,e){a.saveLibrary(d,b,c,e)};p=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(u.value,n,k,f)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(e);c.appendChild(b);this.container=c},EditShapeDialog=function(a,e,c,b,k){b=null!=b?b:300;k=null!=k?k:120;var f,l,d=document.createElement("table"),g=document.createElement("tbody");d.style.cellPadding="4px";f=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan",
+function(){var d=a.createLibraryDataFromImages(n),b=t.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(d))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";b.appendChild(p);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");D.setAttribute("multiple","multiple");
+D.setAttribute("type","file");mxEvent.addListener(D,"change",function(d){B=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,b,c,e,g,m,f,n,p){null!=D.files&&(C(d)(a,b,c,e,g,m,f,n,p),D.type="",D.type="file",D.value="")});u.scrollTop=u.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}p=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);a.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";b.appendChild(p)}p=
+mxUtils.button(mxResources.get("addImages"),function(){null!=A&&(A(),A=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var e=a.indexOf(",");0<e&&(a=a.substring(0,e)+";base64,"+a.substring(e+1))}d(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";b.appendChild(p);this.saveBtnClickHandler=function(d,b,c,e){a.saveLibrary(d,b,c,e)};p=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(t.value,n,k,f)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(e);c.appendChild(b);this.container=c},EditShapeDialog=function(a,e,c,b,k){b=null!=b?b:300;k=null!=k?k:120;var f,l,d=document.createElement("table"),g=document.createElement("tbody");d.style.cellPadding="4px";f=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan",
"2");l.style.fontSize="10pt";mxUtils.write(l,c);f.appendChild(l);g.appendChild(f);f=document.createElement("tr");l=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=b-200+"px";m.style.height=k+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};l.appendChild(m);f.appendChild(l);l=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.top=
-"6px";c.style.width="200px";c.style.height=k+4+"px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);l.appendChild(c);var n=new Graph(c);n.setEnabled(!1);var p=a.editor.graph.cloneCell(e);n.addCells([p]);c=n.view.getState(p);var u="";null!=c.shape&&null!=c.shape.stencil&&(u=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(m,u||"");c=n.getGraphBounds();k=Math.min(160/c.width,(k-40)/c.height);n.view.scaleAndTranslate(k,20/k-c.x,20/k-c.y);f.appendChild(l);
+"6px";c.style.width="200px";c.style.height=k+4+"px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);l.appendChild(c);var n=new Graph(c);n.setEnabled(!1);var p=a.editor.graph.cloneCell(e);n.addCells([p]);c=n.view.getState(p);var t="";null!=c.shape&&null!=c.shape.stencil&&(t=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(m,t||"");c=n.getGraphBounds();k=Math.min(160/c.width,(k-40)/c.height);n.view.scaleAndTranslate(k,20/k-c.x,20/k-c.y);f.appendChild(l);
g.appendChild(f);f=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),k.className="geBtn",l.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&l.appendChild(k);
-var t=function(d,b,c){var e=m.value,g=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(g.documentElement),g=g.documentElement.getElementsByTagName("parsererror");if(null!=g&&0<g.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),g=!d.model.contains(b),!c||g||e!=u){e=Graph.compress(e);d.getModel().beginUpdate();try{if(g){var f=a.editor.graph.getFreeInsertPoint();b.geometry.x=f.x;b.geometry.y=f.y;d.addCell(b)}d.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+e+")",[b])}catch(B){throw B;}finally{d.getModel().endUpdate()}g&&(d.setSelectionCell(b),d.scrollCellToVisible(b))}};c=mxUtils.button(mxResources.get("preview"),function(){t(n,p,!1)});c.className="geBtn";l.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,e,!0)});c.className="geBtn gePrimaryBtn";l.appendChild(c);a.editor.cancelFirst||l.appendChild(k);f.appendChild(l);g.appendChild(f);d.appendChild(g);this.container=d},CustomDialog=function(a,e,c,b,k,f,
+var u=function(d,b,c){var e=m.value,g=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(g.documentElement),g=g.documentElement.getElementsByTagName("parsererror");if(null!=g&&0<g.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),g=!d.model.contains(b),!c||g||e!=t){e=Graph.compress(e);d.getModel().beginUpdate();try{if(g){var f=a.editor.graph.getFreeInsertPoint();b.geometry.x=f.x;b.geometry.y=f.y;d.addCell(b)}d.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+e+")",[b])}catch(B){throw B;}finally{d.getModel().endUpdate()}g&&(d.setSelectionCell(b),d.scrollCellToVisible(b))}};c=mxUtils.button(mxResources.get("preview"),function(){u(n,p,!1)});c.className="geBtn";l.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,e,!0)});c.className="geBtn gePrimaryBtn";l.appendChild(c);a.editor.cancelFirst||l.appendChild(k);f.appendChild(l);g.appendChild(f);d.appendChild(g);this.container=d},CustomDialog=function(a,e,c,b,k,f,
l,d,g){var m=document.createElement("div");m.appendChild(e);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="center";null!=l&&e.appendChild(l);a.isOffline()||null==f||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),l.className="geBtn",e.appendChild(l));g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});g.className="geBtn";d&&(g.style.display="none");a.editor.cancelFirst&&e.appendChild(g);k=mxUtils.button(k||mxResources.get("ok"),
function(){a.hideDialog();null!=c&&c()});e.appendChild(k);k.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(g);m.appendChild(e);this.cancelBtn=g;this.okButton=k;this.container=m},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+
mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates",null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showAll",null,"+ Show all")+
@@ -9354,40 +9355,40 @@ mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geT
mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",e=document.createElement("div");e.innerHTML=a;e.className="geTemplateDlg";
var a=window.innerWidth,c=window.innerHeight,b=987,k=712;.9*a<b&&(b=Math.max(.9*a,600),e.style.width=b+"px");.9*c<k&&(k=Math.max(.9*c,300),e.style.height=k+"px");this.width=b;this.height=k;this.container=e};
TemplatesDialog.prototype.init=function(a,e,c,b,k,f,l,d,g,m){function n(){null!=F&&(F.style.fontWeight="normal",F.style.textDecoration="none",F=null)}function p(a,d,b,c,e,g,m){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+d).src="/images/"+b+"-sel.svg";C.querySelector("."+e).src="/images/"+
-g+".svg";return!0}function u(a){function d(a){Y.removeChild(c);C.removeChild(b);Y.scrollTop=g}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var b=document.createElement("div");b.className="geTempDlgDialogMask";C.appendChild(b);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var e=document.createElement("img");e.src=a;c.appendChild(e);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var g=Y.scrollTop;mxEvent.addListener(a,"click",d);mxEvent.addListener(b,"click",d);Y.appendChild(c);Y.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function t(a,d,b){if(null!=I){for(var c=I.className.split(" "),e=0;e<c.length;e++)if(-1<c[e].indexOf("Active")){c.splice(e,1);break}I.className=c.join(" ")}null!=a?(I=a,I.className+=" "+d,G=b,ba.className="geTempDlgCreateBtn"):(G=I=null,ba.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function q(d){if(null!=G){var b=G;G=null;ba.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";b.isExternal?(1==d?m(b.url,b,"nameInput.value"):g(b.url,b,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+b.url,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(e(d.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var d=C.querySelectorAll(".geTempDlgLinkToDiagram"),b=0;b<d.length;b++)d[b].style.display=
-a}function x(a,d,b){function c(){ba.innerHTML=d?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!d)}W.innerHTML="";t();O=a;var e=null;if(b){e=document.createElement("table");e.className="geTempDlgDiagramsListGrid";var g=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));g.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=
+g+".svg";return!0}function t(a){function d(a){Y.removeChild(c);C.removeChild(b);Y.scrollTop=g}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var b=document.createElement("div");b.className="geTempDlgDialogMask";C.appendChild(b);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var e=document.createElement("img");e.src=a;c.appendChild(e);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var g=Y.scrollTop;mxEvent.addListener(a,"click",d);mxEvent.addListener(b,"click",d);Y.appendChild(c);Y.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function u(a,d,b){if(null!=I){for(var c=I.className.split(" "),e=0;e<c.length;e++)if(-1<c[e].indexOf("Active")){c.splice(e,1);break}I.className=c.join(" ")}null!=a?(I=a,I.className+=" "+d,H=b,ba.className="geTempDlgCreateBtn"):(H=I=null,ba.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+function q(d){if(null!=H){var b=H;H=null;ba.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";b.isExternal?(1==d?m(b.url,b,"nameInput.value"):g(b.url,b,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+b.url,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(e(d.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var d=C.querySelectorAll(".geTempDlgLinkToDiagram"),b=0;b<d.length;b++)d[b].style.display=
+a}function x(a,d,b){function c(){ba.innerHTML=d?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!d)}W.innerHTML="";u();O=a;var e=null;if(b){e=document.createElement("table");e.className="geTempDlgDiagramsListGrid";var g=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));g.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=
mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));g.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));g.appendChild(m);e.appendChild(g);W.appendChild(e)}for(g=0;g<a.length;g++){a[g].isExternal=!d;var f=a[g].url,m=mxUtils.htmlEntities(a[g].title),n=a[g].tooltip||a[g].title,p=a[g].imgUrl,k=mxUtils.htmlEntities(a[g].changedBy||""),l=mxUtils.htmlEntities(a[g].lastModifiedOn||
-"");p||(p=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=b?50:15;null!=m&&m.length>f&&(m=m.substring(0,f)+"&hellip;");if(b){var G=document.createElement("tr"),p=document.createElement("td"),z=document.createElement("img");z.src="/images/icon-search.svg";z.className="geTempDlgDiagramListPreviewBtn";z.setAttribute("title",mxResources.get("preview"));p.appendChild(z);n=document.createElement("span");n.className="geTempDlgDiagramTitle";n.innerHTML=m;p.appendChild(n);G.appendChild(p);p=document.createElement("td");
-p.innerHTML=k;G.appendChild(p);p=document.createElement("td");p.innerHTML=l;G.appendChild(p);e.appendChild(G);null==I&&(c(),t(G,"geTempDlgDiagramsListGridActive",a[g]));(function(a,d){mxEvent.addListener(G,"click",function(){I!=d&&(c(),t(d,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(G,"dblclick",q);mxEvent.addListener(z,"click",function(){u(a)})})(a[g],G)}else{var B=document.createElement("div");B.className="geTempDlgDiagramTile";B.setAttribute("title",n);null==I&&(c(),t(B,"geTempDlgDiagramTileActive",
-a[g]));k=document.createElement("div");k.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var H=document.createElement("img");H.style.display="none";(function(a,d){H.onload=function(){d.className="geTempDlgDiagramTileImg";a.style.display=""};H.onerror=function(){d.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(H,k);H.src=p;k.appendChild(H);B.appendChild(k);k=document.createElement("div");k.className="geTempDlgDiagramTileLbl";k.innerHTML=null!=m?m:"";B.appendChild(k);
-z=document.createElement("img");z.src="/images/icon-search.svg";z.className="geTempDlgDiagramPreviewBtn";z.setAttribute("title",mxResources.get("preview"));B.appendChild(z);(function(a,d){mxEvent.addListener(B,"click",function(){I!=d&&(c(),t(d,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(B,"dblclick",q);mxEvent.addListener(z,"click",function(){u(a)})})(a[g],B);W.appendChild(B)}}}function y(a,d){Z.innerHTML="";t();for(var b=!d&&5<a.length?5:a.length,c=0;c<b;c++){var e=a[c];e.isCategory=!0;
-var g=document.createElement("div"),m=mxResources.get(e.title);null==m&&(m=e.title.substring(0,1).toUpperCase()+e.title.substring(1));g.className="geTempDlgNewDiagramCatItem";g.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==I&&(ba.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),t(g,"geTempDlgNewDiagramCatItemActive",e));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var n=document.createElement("img");
-n.src=NEW_DIAGRAM_CATS_PATH+"/"+e.img;f.appendChild(n);g.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=m;g.appendChild(f);Z.appendChild(g);(function(a,d){mxEvent.addListener(g,"click",function(){I!=d&&(ba.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),t(d,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(g,"dblclick",q)})(e,g)}S.style.display=5>a.length?"none":""}function A(a){var d=C.querySelector(".geTemplatesList"),
+"");p||(p=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=b?50:15;null!=m&&m.length>f&&(m=m.substring(0,f)+"&hellip;");if(b){var H=document.createElement("tr"),p=document.createElement("td"),z=document.createElement("img");z.src="/images/icon-search.svg";z.className="geTempDlgDiagramListPreviewBtn";z.setAttribute("title",mxResources.get("preview"));p.appendChild(z);n=document.createElement("span");n.className="geTempDlgDiagramTitle";n.innerHTML=m;p.appendChild(n);H.appendChild(p);p=document.createElement("td");
+p.innerHTML=k;H.appendChild(p);p=document.createElement("td");p.innerHTML=l;H.appendChild(p);e.appendChild(H);null==I&&(c(),u(H,"geTempDlgDiagramsListGridActive",a[g]));(function(a,d){mxEvent.addListener(H,"click",function(){I!=d&&(c(),u(d,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(H,"dblclick",q);mxEvent.addListener(z,"click",function(){t(a)})})(a[g],H)}else{var B=document.createElement("div");B.className="geTempDlgDiagramTile";B.setAttribute("title",n);null==I&&(c(),u(B,"geTempDlgDiagramTileActive",
+a[g]));k=document.createElement("div");k.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var G=document.createElement("img");G.style.display="none";(function(a,d){G.onload=function(){d.className="geTempDlgDiagramTileImg";a.style.display=""};G.onerror=function(){d.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(G,k);G.src=p;k.appendChild(G);B.appendChild(k);k=document.createElement("div");k.className="geTempDlgDiagramTileLbl";k.innerHTML=null!=m?m:"";B.appendChild(k);
+z=document.createElement("img");z.src="/images/icon-search.svg";z.className="geTempDlgDiagramPreviewBtn";z.setAttribute("title",mxResources.get("preview"));B.appendChild(z);(function(a,d){mxEvent.addListener(B,"click",function(){I!=d&&(c(),u(d,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(B,"dblclick",q);mxEvent.addListener(z,"click",function(){t(a)})})(a[g],B);W.appendChild(B)}}}function y(a,d){Z.innerHTML="";u();for(var b=!d&&5<a.length?5:a.length,c=0;c<b;c++){var e=a[c];e.isCategory=!0;
+var g=document.createElement("div"),m=mxResources.get(e.title);null==m&&(m=e.title.substring(0,1).toUpperCase()+e.title.substring(1));g.className="geTempDlgNewDiagramCatItem";g.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==I&&(ba.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(g,"geTempDlgNewDiagramCatItemActive",e));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var n=document.createElement("img");
+n.src=NEW_DIAGRAM_CATS_PATH+"/"+e.img;f.appendChild(n);g.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=m;g.appendChild(f);Z.appendChild(g);(function(a,d){mxEvent.addListener(g,"click",function(){I!=d&&(ba.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(d,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(g,"dblclick",q)})(e,g)}S.style.display=5>a.length?"none":""}function A(a){var d=C.querySelector(".geTemplatesList"),
b;for(b in a){var c=document.createElement("div"),e=mxResources.get(b),g=a[b];null==e&&(e=b.substring(0,1).toUpperCase()+b.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",e+" ("+g.length+")");e=mxUtils.htmlEntities(e);15<e.length&&(e=e.substring(0,15)+"&hellip;");c.innerHTML=e+" ("+g.length+")";d.appendChild(c);(function(d,b,e){mxEvent.addListener(c,"click",function(){F!=e&&(null!=F?(F.style.fontWeight="normal",F.style.textDecoration="none"):(U.style.display="none",V.style.minHeight=
"100%"),F=e,F.style.fontWeight="bold",F.style.textDecoration="underline",Y.scrollTop=0,D&&(E=!0),aa.innerHTML=b,ca.style.display="none",x(a[d],!0))})})(b,e,c)}}function z(a){l&&(Y.scrollTop=0,W.innerHTML="",T.spin(W),E=!1,D=!0,aa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),J=null,l(X,a?null:f))}function B(a){n();Y.scrollTop=0;W.innerHTML="";T.spin(W);E=!1;D=!0;da=null;aa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+
-' "'+mxUtils.htmlEntities(a)+'"';d(a,X,H?null:f);J=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,D=!1,E=!1,F=null,I=null,G=null,K=!1,H=!0,L=!1,O=[],J,S=C.querySelector(".geTempDlgShowAllBtn"),W=C.querySelector(".geTempDlgDiagramsTiles"),aa=C.querySelector(".geTempDlgDiagramsListTitle"),ca=C.querySelector(".geTempDlgDiagramsListBtns"),Y=C.querySelector(".geTempDlgContent"),V=C.querySelector(".geTempDlgDiagramsList"),U=C.querySelector(".geTempDlgNewDiagramCat"),
-Z=C.querySelector(".geTempDlgNewDiagramCatList"),ba=C.querySelector(".geTempDlgCreateBtn"),T=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(C.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){n();U.style.display="";V.style.minHeight="calc(100% - 280px)";z(H)});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){p(this,"geTempDlgAllDiagramsBtnImg",
-"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(H=!0,null==J?z(H):B(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){p(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(H=!1,null==J?z(H):B(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){p(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
+' "'+mxUtils.htmlEntities(a)+'"';d(a,X,G?null:f);J=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,D=!1,E=!1,F=null,I=null,H=null,K=!1,G=!0,L=!1,O=[],J,S=C.querySelector(".geTempDlgShowAllBtn"),W=C.querySelector(".geTempDlgDiagramsTiles"),aa=C.querySelector(".geTempDlgDiagramsListTitle"),ca=C.querySelector(".geTempDlgDiagramsListBtns"),Y=C.querySelector(".geTempDlgContent"),V=C.querySelector(".geTempDlgDiagramsList"),U=C.querySelector(".geTempDlgNewDiagramCat"),
+Z=C.querySelector(".geTempDlgNewDiagramCatList"),ba=C.querySelector(".geTempDlgCreateBtn"),T=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(C.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){n();U.style.display="";V.style.minHeight="calc(100% - 280px)";z(G)});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){p(this,"geTempDlgAllDiagramsBtnImg",
+"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(G=!0,null==J?z(G):B(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){p(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(G=!1,null==J?z(G):B(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){p(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
"tiles",!1)&&(L=!0,x(O,!1,L))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){p(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(L=!1,x(O,!1,L))});mxEvent.addListener(S,"click",function(){K?(U.style.height="280px",Z.style.height="190px",S.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(ga)):(U.style.height="440px",Z.style.height="355px",S.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
null,"- Show less")),y(ga,!0));K=!K});var P=!1,Q=!1,M={},ga=[],R=1;mxUtils.get(b,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var d=a.getAttribute("url");if(null!=d){var b=d.indexOf("/"),d=d.substring(0,b),b=M[d];null==b&&(R++,b=[],M[d]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=
a.nextSibling}A(M)}});mxUtils.get(k,function(a){if(!Q){Q=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ga.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;y(ga)}});var X=function(a,d){ca.style.display="";T.stop();D=!1;E?E=!1:d?W.innerHTML=d:0==a.length?W.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):
-x(a,!1,L)};z(H);var da=null;d&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var d=this;null!=da&&clearTimeout(da);13==a.keyCode?B(d.value):da=setTimeout(function(){B(d.value)},500)});mxEvent.addListener(ba,"click",q);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){q(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();a.hideDialog(!0)})};
+x(a,!1,L)};z(G);var da=null;d&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var d=this;null!=da&&clearTimeout(da);13==a.keyCode?B(d.value):da=setTimeout(function(){B(d.value)},500)});mxEvent.addListener(ba,"click",q);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){q(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();a.hideDialog(!0)})};
var BtnDialog=function(a,e,c,b){var k=document.createElement("div");k.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("done"));var l="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight="10px";e==a.drive?(l=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==a.dropbox?
(l=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==a.oneDrive?(l=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==a.gitHub?(l=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==a.gitLab?(l=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg"):e==a.trello&&(l=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[l],"You are now authorized in {1}"));
c=mxUtils.button(c,b);c.insertBefore(d,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";k.appendChild(f);k.appendChild(a);k.appendChild(c);this.container=k},FontDialog=function(a,e,c,b,k){function f(a){this.style.border="";13==a.keyCode&&A.click()}var l,d,g,m=document.createElement("table"),n=document.createElement("tbody");m.style.marginTop="8px";l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace=
"nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","sysfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-sysfonts");d.appendChild(p);g=document.createElement("label");g.setAttribute("for","fontdialog-sysfonts");mxUtils.write(g,mxResources.get("sysFonts",null,"System Fonts"));d.appendChild(g);l.appendChild(d);n.appendChild(l);
-l=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");l.appendChild(d);var u=document.createElement("input");"s"==b&&u.setAttribute("value",e);u.style.marginLeft="4px";u.style.width="250px";u.className="dlg_fontName_s";d=document.createElement("td");d.appendChild(u);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");
-d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","googlefonts");t.setAttribute("type","radio");t.setAttribute("name","current-fontdialog");t.setAttribute("id","fontdialog-googlefonts");d.appendChild(t);g=document.createElement("label");g.setAttribute("for","fontdialog-googlefonts");mxUtils.write(g,mxResources.get("googleFonts",
+l=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");l.appendChild(d);var t=document.createElement("input");"s"==b&&t.setAttribute("value",e);t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_s";d=document.createElement("td");d.appendChild(t);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");
+d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","googlefonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-googlefonts");d.appendChild(u);g=document.createElement("label");g.setAttribute("for","fontdialog-googlefonts");mxUtils.write(g,mxResources.get("googleFonts",
null,"Google Fonts"));d.appendChild(g);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");l.appendChild(d);var q=document.createElement("input");"g"==b&&q.setAttribute("value",e);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_g";d=document.createElement("td");d.appendChild(q);
l.appendChild(d);n.appendChild(l);l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-webfonts");d.appendChild(v);g=document.createElement("label");g.setAttribute("for",
"fontdialog-webfonts");mxUtils.write(g,mxResources.get("webfonts",null,"Web Fonts"));d.appendChild(g);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");l.appendChild(d);var x=document.createElement("input");"w"==b&&x.setAttribute("value",e);x.style.marginLeft="4px";x.style.width="250px";
x.className="dlg_fontName_w";d=document.createElement("td");d.appendChild(x);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontUrl",null,"Font URL")+":");l.appendChild(d);var y=document.createElement("input");y.setAttribute("value",c||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";d=document.createElement("td");
-d.appendChild(y);l.appendChild(d);n.appendChild(l);this.init=function(){var a=u;"g"==b?a=q:"w"==b&&(a=x);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");a.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),
-e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);var A=mxUtils.button(mxResources.get("apply"),function(){var d,b,c;p.checked?(d=u.value,c="s"):t.checked?(d=q.value,b=Editor.GOOGLE_FONTS+encodeURIComponent(d).replace(/%20/g,"+"),c="g"):v.checked&&(d=x.value,b=y.value,c="w");var e;e=b;var g=c,f=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==
-d||0==d.length?(m.querySelector(".dlg_fontName_"+g).style.border="1px solid red",e=!1):"w"!=g||f.test(e)?e=!0:(m.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(k(d,b,c),a.hideDialog())});A.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",f);mxEvent.addListener(q,"keypress",f);mxEvent.addListener(x,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(u,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(q,"focus",
-function(){t.setAttribute("checked","checked");t.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});d.appendChild(A);a.editor.cancelFirst||d.appendChild(e);l.appendChild(d);n.appendChild(l);m.appendChild(n);this.container=m};
+d.appendChild(y);l.appendChild(d);n.appendChild(l);this.init=function(){var a=t;"g"==b?a=q:"w"==b&&(a=x);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");a.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),
+e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);var A=mxUtils.button(mxResources.get("apply"),function(){var d,b,c;p.checked?(d=t.value,c="s"):u.checked?(d=q.value,b=Editor.GOOGLE_FONTS+encodeURIComponent(d).replace(/%20/g,"+"),c="g"):v.checked&&(d=x.value,b=y.value,c="w");var e;e=b;var g=c,f=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==
+d||0==d.length?(m.querySelector(".dlg_fontName_"+g).style.border="1px solid red",e=!1):"w"!=g||f.test(e)?e=!0:(m.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(k(d,b,c),a.hideDialog())});A.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",f);mxEvent.addListener(q,"keypress",f);mxEvent.addListener(x,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(q,"focus",
+function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});d.appendChild(A);a.editor.cancelFirst||d.appendChild(e);l.appendChild(d);n.appendChild(l);m.appendChild(n);this.container=m};
function AspectDialog(a,e,c,b,k){this.aspect={pageId:e||a.pages[0].getId(),layerIds:c||[]};e=document.createElement("div");var f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("pages"));e.appendChild(f);c=document.createElement("div");c.className="geAspectDlgList";e.appendChild(c);f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("layers"));e.appendChild(f);f=document.createElement("div");f.className="geAspectDlgList";
e.appendChild(f);this.pagesContainer=c;this.layersContainer=f;this.ui=a;c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);var l=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));c.appendChild(l);l.className="geBtn gePrimaryBtn";
a.editor.cancelFirst||c.appendChild(f);l.setAttribute("disabled","disabled");this.okBtn=l;e.appendChild(c);this.container=e}AspectDialog.prototype.init=function(){this.ui.getFileData(!0);for(var a=0;a<this.ui.pages.length;a++){var e=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(e.getId(),e.getName(),e.node,e.root)}};
@@ -9420,27 +9421,28 @@ Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3d
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=":
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
-Editor.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"/>');Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,
-isVisible:function(a,d){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
-isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",
-defVal:0,min:0,max:1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",
-dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",
-type:"float",min:0,defVal:1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",
-type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},
-{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},
-{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",
-dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(a,
-d){var b=d.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLastRow","0")},isVisible:function(a,d){var b=d.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,d){var b=d.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,
-"resizeLast","0")},isVisible:function(a,d){var b=d.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",dispName:"Fill"},{val:"width",
-dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(a,d){return d.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",
-type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",
-dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,d){var b=
-1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=d.editorUi.editor.graph;return null!=b&&(c.isSwimlane(b)||0<c.model.getChildCount(b))},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,d){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=d.editorUi.editor.graph;return null!=b&&(c.isContainer(b)&&"0"!=a.style.collapsible||!c.isContainer(b)&&"1"==a.style.collapsible)},
-isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length&&!d.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,d){var b=d.editorUi.editor.graph.model;return 0<a.vertices.length?
-b.isVertex(b.getParent(a.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,d){var b=0<a.vertices.length?d.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=b&&!b.relative}},
-{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",
-defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,d){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,d){return 0<a.vertices.length&&d.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
+Editor.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"/>');Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",
+type:"bool",defVal:!1,isVisible:function(a,d){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",
+type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",
+type:"float",defVal:0,min:0,max:1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":
+"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",
+dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",
+dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",
+dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",
+type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},
+{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",
+type:"bool",getDefaultValue:function(a,d){var b=d.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLastRow","0")},isVisible:function(a,d){var b=d.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,d){var b=d.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:
+null);return"1"==mxUtils.getValue(b,"resizeLast","0")},isVisible:function(a,d){var b=d.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",
+dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(a,d){return d.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",
+type:"bool",getDefaultValue:function(a,d){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=d.editorUi.editor.graph;return null!=b&&(c.isSwimlane(b)||0<c.model.getChildCount(b))},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,d){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=d.editorUi.editor.graph;return null!=b&&(c.isContainer(b)&&"0"!=a.style.collapsible||
+!c.isContainer(b)&&"1"==a.style.collapsible)},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length&&!d.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,d){var b=
+d.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(a.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,d){var b=0<a.vertices.length?d.editorUi.editor.graph.getCellGeometry(a.vertices[0]):
+null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",
+dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,d){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,d){return 0<a.vertices.length&&d.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);
+Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
Editor.createRoughCanvas=function(a){var d=rough.canvas({getContext:function(){return a}});d.draw=function(d){var b=d.sets||[];d=d.options||this.getDefaultOptions();for(var c=0;c<b.length;c++){var e=b[c];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(a,e,d);break;case "fillPath":this._drawToContext(a,e,d);break;case "fillSketch":this.fillSketch(a,e,d)}}};d.fillSketch=function(d,b,c){var e=a.state.strokeColor,g=a.state.strokeWidth,m=a.state.strokeAlpha,f=a.state.dashed,n=c.fillWeight;
0>n&&(n=c.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(c.fill||"");a.setStrokeWidth(n);a.setDashed(!1);this._drawToContext(d,b,c);a.setDashed(f);a.setStrokeWidth(g);a.setStrokeColor(e);a.setStrokeAlpha(m)};d._drawToContext=function(a,d,b){a.begin();for(var c=0;c<d.ops.length;c++){var e=d.ops[c],g=e.data;switch(e.op){case "move":a.moveTo(g[0],g[1]);break;case "bcurveTo":a.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":a.lineTo(g[0],g[1])}}a.end();"fillPath"===d.type&&
b.filled?a.fill():a.stroke()};return d};(function(){function a(d,b,c){this.canvas=d;this.rc=b;this.shape=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,a.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,a.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,a.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
@@ -9502,17 +9504,17 @@ else if("eot"==f||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";els
function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;a()})):a()};Editor.prototype.embedExtFonts=function(a){var d=this.graph.extFonts;if(null!=d&&0<d.length){var b="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(b,a)}),g=0;g<d.length;g++)mxUtils.bind(this,function(a,d){0==d.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[d]?
(c++,this.loadUrl(d,mxUtils.bind(this,function(a){this.cachedGoogleFonts[d]=a;b+=a;c--;e()}),mxUtils.bind(this,function(a){c--;b+="@import url("+d+");";e()}))):b+=this.cachedGoogleFonts[d]:b+='@font-face {font-family: "'+a+'";src: url("'+d+'");}'})(d[g].name,d[g].url);e()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var d=document.getElementsByTagName("style"),b=0;b<d.length;b++)0<mxUtils.getTextContent(d[b]).indexOf("MathJax")&&a[0].appendChild(d[b].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var b=a.getElementsByTagName("defs"),c=a.ownerDocument;0==b.length?(b=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,d);b.appendChild(c)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,d,b,c,e,g,m,f,n,p,k,l,u,z,t,q){try{g=null!=g?g:!0;m=null!=m?m:!0;l=null!=l?l:this.graph;u=null!=u?u:0;var v=n?null:l.background;v==mxConstants.NONE&&(v=null);null==v&&(v=c);null==v&&0==n&&(v=q?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(l.getSvg(null,null,null,z,null,m,null,null,null,p,null,q),mxUtils.bind(this,function(b){try{var c=
-new Image;c.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){z.drawImage(c,u/f,u/f);a(n)},0):(z.drawImage(c,u/f,u/f),a(n))},n=document.createElement("canvas"),p=parseInt(b.getAttribute("width")),k=parseInt(b.getAttribute("height"));f=null!=f?f:1;null!=d&&(f=g?Math.min(1,Math.min(3*d/(4*k),d/p)):d/p);p=Math.ceil(f*p)+2*u;k=Math.ceil(f*k)+2*u;n.setAttribute("width",p);n.setAttribute("height",k);var z=n.getContext("2d");null!=v&&(z.beginPath(),z.rect(0,
-0,p,k),z.fillStyle=v,z.fill());z.scale(f,f);if(t){var q=l.view,B=q.scale;q.scale=1;var x=btoa(unescape(encodeURIComponent(q.createSvgGrid(q.gridColor))));q.scale=B;var x="data:image/svg+xml;base64,"+x,G=l.gridSize*q.gridSteps*f,C=l.getGraphBounds(),y=q.translate.x*B,H=q.translate.y*B,D=y+(C.x-y)/B,K=H+(C.y-H)/B,A=new Image;A.onload=function(){try{for(var a=-Math.round(G-mxUtils.mod((y-D)*f,G)),d=-Math.round(G-mxUtils.mod((H-K)*f,G));a<p;a+=G)for(var b=d;b<k;b+=G)z.drawImage(A,a/f,b/f);m()}catch(na){null!=
-e&&e(na)}};A.onerror=function(a){null!=e&&e(a)};A.src=x}else m()}catch(ka){null!=e&&e(ka)}});c.onerror=function(a){null!=e&&e(a)};p&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(R){null!=e&&e(R)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(m)}catch(X){null!=
-e&&e(X)}}))}catch(R){null!=e&&e(R)}}),b,k)}catch(Q){null!=e&&e(Q)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var f=k,l=0;8>l;l++)f=1==(f&1)?3988292384^f>>>1:f>>>1,Editor.crcTable[k]=f;Editor.updateCRC=function(a,d,b,c){for(var e=0;e<c;e++)a=Editor.crcTable[(a^d.charCodeAt(b+e))&255]^a>>>8;return a};Editor.crc32=function(a){for(var d=-1,b=0;b<a.length;b++)d=d>>>8^Editor.crcTable[(d^a.charCodeAt(b))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(a,d,b,c,e){function g(a,d){var b=n;n+=
-d;return a.substring(b,n)}function m(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(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,n);do{var p=m(a);if("IDAT"==g(a,4)){e=a.substring(0,
-n-8);"pHYs"==d&&"dpi"==b?(b=Math.round(c/.0254),b=f(b)+f(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+c;c=4294967295;c=Editor.updateCRC(c,d,0,4);c=Editor.updateCRC(c,b,0,b.length);e+=f(b.length)+d+b+f(c^4294967295);e+=a.substring(n-8,a.length);break}e+=a.substring(n-8,n-4+p);g(a,p);g(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,d,b,c,e,g,m,f,n,p,k,l,t,z,u,q){try{g=null!=g?g:!0;m=null!=m?m:!0;l=null!=l?l:this.graph;t=null!=t?t:0;var v=n?null:l.background;v==mxConstants.NONE&&(v=null);null==v&&(v=c);null==v&&0==n&&(v=q?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(l.getSvg(null,null,t,z,null,m,null,null,null,p,null,q),mxUtils.bind(this,function(b){try{var c=new Image;
+c.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){z.drawImage(c,0,0);a(n)},0):(z.drawImage(c,0,0),a(n))},n=document.createElement("canvas"),p=parseInt(b.getAttribute("width")),k=parseInt(b.getAttribute("height"));f=null!=f?f:1;null!=d&&(f=g?Math.min(1,Math.min(3*d/(4*k),d/p)):d/p);p=Math.ceil(f*p);k=Math.ceil(f*k);n.setAttribute("width",p);n.setAttribute("height",k);var z=n.getContext("2d");null!=v&&(z.beginPath(),z.rect(0,0,p,k),z.fillStyle=v,
+z.fill());z.scale(f,f);if(u){var q=l.view,B=q.scale;q.scale=1;var x=btoa(unescape(encodeURIComponent(q.createSvgGrid(q.gridColor))));q.scale=B;var x="data:image/svg+xml;base64,"+x,H=l.gridSize*q.gridSteps*f,C=l.getGraphBounds(),G=q.translate.x*B,y=q.translate.y*B,D=G+(C.x-G)/B-t,K=y+(C.y-y)/B-t,A=new Image;A.onload=function(){try{for(var a=-Math.round(H-mxUtils.mod((G-D)*f,H)),d=-Math.round(H-mxUtils.mod((y-K)*f,H));a<p;a+=H)for(var b=d;b<k;b+=H)z.drawImage(A,a/f,b/f);m()}catch(na){null!=e&&e(na)}};
+A.onerror=function(a){null!=e&&e(a)};A.src=x}else m()}catch(ka){null!=e&&e(ka)}});c.onerror=function(a){null!=e&&e(a)};p&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(R){null!=e&&e(R)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(m)}catch(X){null!=e&&e(X)}}))}catch(R){null!=
+e&&e(R)}}),b,k)}catch(Q){null!=e&&e(Q)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var f=k,l=0;8>l;l++)f=1==(f&1)?3988292384^f>>>1:f>>>1,Editor.crcTable[k]=f;Editor.updateCRC=function(a,d,b,c){for(var e=0;e<c;e++)a=Editor.crcTable[(a^d.charCodeAt(b+e))&255]^a>>>8;return a};Editor.crc32=function(a){for(var d=-1,b=0;b<a.length;b++)d=d>>>8^Editor.crcTable[(d^a.charCodeAt(b))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(a,d,b,c,e){function g(a,d){var b=n;n+=d;return a.substring(b,n)}
+function m(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(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,n);do{var p=m(a);if("IDAT"==g(a,4)){e=a.substring(0,n-8);"pHYs"==d&&"dpi"==
+b?(b=Math.round(c/.0254),b=f(b)+f(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+c;c=4294967295;c=Editor.updateCRC(c,d,0,4);c=Editor.updateCRC(c,b,0,b.length);e+=f(b.length)+d+b+f(c^4294967295);e+=a.substring(n-8,a.length);break}e+=a.substring(n-8,n-4+p);g(a,p);g(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,d){var b=null;null!=a.editor.graph.getModel().getParent(d)?b=d.getId():null!=a.currentPage&&
(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?n.apply(this,arguments):this.clear()};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 p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=p.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 u=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=u.apply(this,arguments);var d=this.editorUi,
+!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 t=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=t.apply(this,arguments);var d=this.editorUi,
b=d.editor.graph;if(b.isEnabled()){var c=d.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(a){d.editor.setAutosave(a);d.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});a.appendChild(e)}}if(this.isMathOptionVisible()&&
b.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){d.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";a.appendChild(e);var g=d.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
@@ -9538,23 +9540,23 @@ stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,d,b){if(null!=d){var c=function(a){if(null!=a)if(b)for(var c=
0;c<a.length;c++)d[a[c].name]=a[c];else for(var e in d){for(var g=!1,c=0;c<a.length;c++)if(a[c].name==e&&a[c].type==d[e].type){g=!0;break}g||delete d[e]}},e=this.editorUi.editor.graph.view.getState(a);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),
-c(e.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(J){}}};var t=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));t.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},b=a.vertices,c=a.edges,e=0;e<b.length;e++)this.findCommonProperties(b[e],d,0==e);for(e=0;e<c.length;e++)this.findCommonProperties(c[e],
+c(e.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(J){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},b=a.vertices,c=a.edges,e=0;e<b.length;e++)this.findCommonProperties(b[e],d,0==e);for(e=0;e<c.length;e++)this.findCommonProperties(c[e],
d,0==b.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,a))}};var q=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 q.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
function(a,d,b){function c(a,d,b,c){l.getModel().beginUpdate();try{var e=[],g=[];if(null!=b.index){for(var m=[],f=b.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)m.push(f.getAttribute("data-pValue")),f=f.nextSibling;b.index<m.length?null!=c?m.splice(c,1):m[b.index]=d:m.push(d);null!=b.size&&m.length>b.size&&(m=m.slice(0,b.size));d=m.join(",");null!=b.countProperty&&(l.setCellStyles(b.countProperty,m.length,l.getSelectionCells()),e.push(b.countProperty),g.push(m.length))}l.setCellStyles(a,
-d,l.getSelectionCells());e.push(a);g.push(d);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],p=b.dependentPropsVals[a];if(p.length>d)p=p.slice(0,d);else for(var u=p.length;u<d;u++)p.push(n);p=p.join(",");l.setCellStyles(b.dependentProps[a],p,l.getSelectionCells());e.push(b.dependentProps[a]);g.push(p)}if("function"==typeof b.onChange)b.onChange(l,d);k.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}
+d,l.getSelectionCells());e.push(a);g.push(d);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],p=b.dependentPropsVals[a];if(p.length>d)p=p.slice(0,d);else for(var t=p.length;t<d;t++)p.push(n);p=p.join(",");l.setCellStyles(b.dependentProps[a],p,l.getSelectionCells());e.push(b.dependentProps[a]);g.push(p)}if("function"==typeof b.onChange)b.onChange(l,d);k.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}
function e(d,b,c){var e=mxUtils.getOffset(a,!0),g=mxUtils.getOffset(d,!0);b.style.position="absolute";b.style.left=g.x-e.x+"px";b.style.top=g.y-e.y+"px";b.style.width=d.offsetWidth+"px";b.style.height=d.offsetHeight-(c?4:0)+"px";b.style.zIndex=5}function g(a,d,b){var e=document.createElement("div");e.style.width="32px";e.style.height="4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(k,
-function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;c(a,d,b)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function m(a,d,b,e,g,m,f){null!=d&&(d=d.split(","),u.push({name:a,values:d,type:b,defVal:e,countProperty:g,parentRow:m,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(k,function(d){for(var n=m,k=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
-a)n=n.nextSibling,k++;else break;var l={type:b,parentRow:m,index:k,isDeletable:!0,defVal:e,countProperty:g},k=p(a,"",l,0==k%2,f);c(a,e,l);n.parentNode.insertBefore(k,n.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function f(a,d,b,c,e,g,m){if(0<e){var f=Array(e);d=null!=d?d.split(","):[];for(var n=0;n<e;n++)f[n]=null!=d[n]?d[n]:null!=c?c:"";u.push({name:a,values:f,type:b,defVal:c,parentRow:g,flipBkg:m,size:e})}return document.createElement("div")}
-function n(a,d,b){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){c(a,e.checked?"1":"0",b)});return e}function p(d,b,p,l,u){var t=p.dispName,z=p.type,q=document.createElement("tr");q.className="gePropRow"+(u?"Dark":"")+(l?"Alt":"")+" gePropNonHeaderRow";q.setAttribute("data-pName",d);q.setAttribute("data-pValue",b);l=!1;null!=p.index&&(q.setAttribute("data-index",p.index),t=(null!=t?t:"")+"["+p.index+"]",l=!0);var v=document.createElement("td");
-v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(t,null,t));l&&(v.style.textAlign="right");q.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==z)v.appendChild(g(d,b,p));else if("bool"==z||"boolean"==z)v.appendChild(n(d,b,p));else if("enum"==z){var B=p.enumList;for(u=0;u<B.length;u++)if(t=B[u],t.val==b){v.innerHTML=mxUtils.htmlEntities(mxResources.get(t.dispName,null,t.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(k,function(){var g=
-document.createElement("select");e(v,g);for(var m=0;m<B.length;m++){var f=B[m],n=document.createElement("option");n.value=mxUtils.htmlEntities(f.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));g.appendChild(n)}g.value=b;a.appendChild(g);mxEvent.addListener(g,"change",function(){var a=mxUtils.htmlEntities(g.value);c(d,a,p)});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})}))}else"dynamicArr"==z?v.appendChild(m(d,b,p.subType,p.subDefVal,p.countProperty,
-q,u)):"staticArr"==z?v.appendChild(f(d,b,p.subType,p.subDefVal,p.size,q,u)):(v.innerHTML=b,mxEvent.addListener(v,"click",mxUtils.bind(k,function(){function g(){var a=m.value,a=0==a.length&&"string"!=z?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",z="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==z?parseInt(a):a)+"");c(d,a,p)}var m=document.createElement("input");e(v,m,!0);m.value=b;m.className=
-"gePropEditor";"int"!=z&&"float"!=z||p.allowAuto||(m.type="number",m.step="int"==z?"1":"any",null!=p.min&&(m.min=parseFloat(p.min)),null!=p.max&&(m.max=parseFloat(p.max)));a.appendChild(m);mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&g()});m.focus();mxEvent.addListener(m,"blur",function(){g()})})));p.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(k,function(a){c(d,"",p,p.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",
-v.appendChild(u));q.appendChild(v);return q}var k=this,l=this.editorUi.editor.graph,u=[];a.style.position="relative";a.style.padding="0";var z=document.createElement("table");z.className="geProperties";z.style.whiteSpace="nowrap";z.style.width="100%";var t=document.createElement("tr");t.className="gePropHeader";var q=document.createElement("th");q.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;q.appendChild(v);mxUtils.write(q,mxResources.get("property"));
-t.style.cursor="pointer";var B=function(){var d=z.querySelectorAll(".gePropNonHeaderRow"),b;if(k.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var e=a.childNodes[c],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||a.removeChild(e)}catch(ma){}}else v.src=Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(t,"click",function(){k.editorUi.propertiesCollapsed=!k.editorUi.propertiesCollapsed;
-B()});t.appendChild(q);q=document.createElement("th");q.className="gePropHeaderCell";q.innerHTML=mxResources.get("value");t.appendChild(q);z.appendChild(t);var x=!1,C=!1,y;for(y in d)if(t=d[y],"function"!=typeof t.isVisible||t.isVisible(b,this)){var G=null!=b.style[y]?mxUtils.htmlEntities(b.style[y]+""):null!=t.getDefaultValue?t.getDefaultValue(b,this):t.defVal;if("separator"==t.type)C=!C;else{if("staticArr"==t.type)t.size=parseInt(b.style[t.sizeProperty]||d[t.sizeProperty].defVal)||0;else if(null!=
-t.dependentProps){for(var H=t.dependentProps,D=[],A=[],q=0;q<H.length;q++){var K=b.style[H[q]];A.push(d[H[q]].subDefVal);D.push(null!=K?K.split(","):[])}t.dependentPropsDefVal=A;t.dependentPropsVals=D}z.appendChild(p(y,G,t,x,C));x=!x}}for(q=0;q<u.length;q++)for(t=u[q],d=t.parentRow,b=0;b<t.values.length;b++)y=p(t.name,t.values[b],{type:t.type,parentRow:t.parentRow,isDeletable:t.isDeletable,index:b,defVal:t.defVal,countProperty:t.countProperty,size:t.size},0==b%2,t.flipBkg),d.parentNode.insertBefore(y,
+function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;c(a,d,b)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function m(a,d,b,e,g,m,f){null!=d&&(d=d.split(","),t.push({name:a,values:d,type:b,defVal:e,countProperty:g,parentRow:m,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(k,function(d){for(var n=m,k=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
+a)n=n.nextSibling,k++;else break;var l={type:b,parentRow:m,index:k,isDeletable:!0,defVal:e,countProperty:g},k=p(a,"",l,0==k%2,f);c(a,e,l);n.parentNode.insertBefore(k,n.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function f(a,d,b,c,e,g,m){if(0<e){var f=Array(e);d=null!=d?d.split(","):[];for(var n=0;n<e;n++)f[n]=null!=d[n]?d[n]:null!=c?c:"";t.push({name:a,values:f,type:b,defVal:c,parentRow:g,flipBkg:m,size:e})}return document.createElement("div")}
+function n(a,d,b){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){c(a,e.checked?"1":"0",b)});return e}function p(d,b,p,l,t){var z=p.dispName,u=p.type,q=document.createElement("tr");q.className="gePropRow"+(t?"Dark":"")+(l?"Alt":"")+" gePropNonHeaderRow";q.setAttribute("data-pName",d);q.setAttribute("data-pValue",b);l=!1;null!=p.index&&(q.setAttribute("data-index",p.index),z=(null!=z?z:"")+"["+p.index+"]",l=!0);var v=document.createElement("td");
+v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(z,null,z));l&&(v.style.textAlign="right");q.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==u)v.appendChild(g(d,b,p));else if("bool"==u||"boolean"==u)v.appendChild(n(d,b,p));else if("enum"==u){var B=p.enumList;for(t=0;t<B.length;t++)if(z=B[t],z.val==b){v.innerHTML=mxUtils.htmlEntities(mxResources.get(z.dispName,null,z.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(k,function(){var g=
+document.createElement("select");e(v,g);for(var m=0;m<B.length;m++){var f=B[m],n=document.createElement("option");n.value=mxUtils.htmlEntities(f.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));g.appendChild(n)}g.value=b;a.appendChild(g);mxEvent.addListener(g,"change",function(){var a=mxUtils.htmlEntities(g.value);c(d,a,p)});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})}))}else"dynamicArr"==u?v.appendChild(m(d,b,p.subType,p.subDefVal,p.countProperty,
+q,t)):"staticArr"==u?v.appendChild(f(d,b,p.subType,p.subDefVal,p.size,q,t)):(v.innerHTML=b,mxEvent.addListener(v,"click",mxUtils.bind(k,function(){function g(){var a=m.value,a=0==a.length&&"string"!=u?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",u="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==u?parseInt(a):a)+"");c(d,a,p)}var m=document.createElement("input");e(v,m,!0);m.value=b;m.className=
+"gePropEditor";"int"!=u&&"float"!=u||p.allowAuto||(m.type="number",m.step="int"==u?"1":"any",null!=p.min&&(m.min=parseFloat(p.min)),null!=p.max&&(m.max=parseFloat(p.max)));a.appendChild(m);mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&g()});m.focus();mxEvent.addListener(m,"blur",function(){g()})})));p.isDeletable&&(t=mxUtils.button("-",mxUtils.bind(k,function(a){c(d,"",p,p.index);mxEvent.consume(a)})),t.style.height="16px",t.style.width="25px",t.style["float"]="right",t.className="geColorBtn",
+v.appendChild(t));q.appendChild(v);return q}var k=this,l=this.editorUi.editor.graph,t=[];a.style.position="relative";a.style.padding="0";var z=document.createElement("table");z.className="geProperties";z.style.whiteSpace="nowrap";z.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var q=document.createElement("th");q.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;q.appendChild(v);mxUtils.write(q,mxResources.get("property"));
+u.style.cursor="pointer";var B=function(){var d=z.querySelectorAll(".gePropNonHeaderRow"),b;if(k.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var e=a.childNodes[c],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||a.removeChild(e)}catch(ma){}}else v.src=Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(u,"click",function(){k.editorUi.propertiesCollapsed=!k.editorUi.propertiesCollapsed;
+B()});u.appendChild(q);q=document.createElement("th");q.className="gePropHeaderCell";q.innerHTML=mxResources.get("value");u.appendChild(q);z.appendChild(u);var x=!1,C=!1,y;for(y in d)if(u=d[y],"function"!=typeof u.isVisible||u.isVisible(b,this)){var H=null!=b.style[y]?mxUtils.htmlEntities(b.style[y]+""):null!=u.getDefaultValue?u.getDefaultValue(b,this):u.defVal;if("separator"==u.type)C=!C;else{if("staticArr"==u.type)u.size=parseInt(b.style[u.sizeProperty]||d[u.sizeProperty].defVal)||0;else if(null!=
+u.dependentProps){for(var G=u.dependentProps,D=[],A=[],q=0;q<G.length;q++){var K=b.style[G[q]];A.push(d[G[q]].subDefVal);D.push(null!=K?K.split(","):[])}u.dependentPropsDefVal=A;u.dependentPropsVals=D}z.appendChild(p(y,H,u,x,C));x=!x}}for(q=0;q<t.length;q++)for(u=t[q],d=u.parentRow,b=0;b<u.values.length;b++)y=p(u.name,u.values[b],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,index:b,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==b%2,u.flipBkg),d.parentNode.insertBefore(y,
d.nextSibling),d=y;a.appendChild(z);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,c=b.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);
var g="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(" "),m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.position="relative";m.style.textAlign="center";for(var f=[],n=0;n<this.defaultColorSchemes.length;n++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){k(a)}))})(n);f.push(p);m.appendChild(p)}var k=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(f[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;l(this.defaultColorSchemes[this.format.currentScheme]);f[this.format.currentScheme].style.background=
@@ -9564,9 +9566,9 @@ null)),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||(f=""==
mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(e[m],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":d.style.backgroundImage=
"linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":d.style.backgroundColor=""==a.fill?mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),d.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(b.initialDefaultVertexStyle,
mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var m=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=m;d.style.border="1px solid "+f}e.appendChild(d)});e.innerHTML="";for(var m=0;m<a.length;m++)0<m&&0==mxUtils.mod(m,
-4)&&mxUtils.br(e),d(a[m])});null==this.format.currentScheme?k("dark"==uiTheme?1:0):k(this.format.currentScheme);var n=10>=this.defaultColorSchemes.length?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+n+"px;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(u,"click",mxUtils.bind(this,function(){k(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var z=document.createElement("div");z.style.cssText="position:absolute;left:202px;top:8px;bottom:"+n+"px;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(u),a.appendChild(z));mxEvent.addListener(z,"click",mxUtils.bind(this,function(){k(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(z);l(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(m);return a};StyleFormatPanel.prototype.addEditOps=function(a){var d=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&(b=mxUtils.button(mxResources.get("editStyle"),
+4)&&mxUtils.br(e),d(a[m])});null==this.format.currentScheme?k("dark"==uiTheme?1:0):k(this.format.currentScheme);var n=10>=this.defaultColorSchemes.length?28:8,t=document.createElement("div");t.style.cssText="position:absolute;left:10px;top:8px;bottom:"+n+"px;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(t,"click",mxUtils.bind(this,function(){k(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var z=document.createElement("div");z.style.cssText="position:absolute;left:202px;top:8px;bottom:"+n+"px;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(t),a.appendChild(z));mxEvent.addListener(z,"click",mxUtils.bind(this,function(){k(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(t);d(z);l(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(m);return a};StyleFormatPanel.prototype.addEditOps=function(a){var d=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&(b=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var c=this.editorUi.editor.graph,e=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=e&&null!=e.shape&&null!=e.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 v=Graph.prototype.init;
@@ -9575,10 +9577,10 @@ window.mxFreehand&&(this.freehand=new mxFreehand(this));var d=null;mxEvent.addLi
if(null!=d){if("rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.allowGaps=d.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==d.childLayout)return b=new mxTableLayout(this.graph),b.rows=d.tableRows||
2,b.columns=d.tableColumns||2,b.colPercentages=d.colPercentages,b.rowPercentages=d.rowPercentages,b.equalColumns="1"==mxUtils.getValue(d,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(d,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.border=d.tableBorder||b.border,b.marginLeft=d.marginLeft||0,b.marginRight=d.marginRight||0,b.marginTop=d.marginTop||0,b.marginBottom=d.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(d,
"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(d,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=d.colWidths||"100",b.rowHeights=d.rowHeights||"50",b}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return x.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
-null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var d in a)this.globalVars[d]=a[d]}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var d=y.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[a]);
-return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,d,b,c,e,g,m,f,n,p,k,l){var u=null;l||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
-this.refresh());var z=A.apply(this,arguments);if(k&&null!=this.extFonts&&0<this.extFonts.length){var t=z.ownerDocument,q=null!=t.createElementNS?t.createElementNS(mxConstants.NS_SVG,"style"):t.createElement("style");null!=t.setAttributeNS?q.setAttributeNS("type","text/css"):q.setAttribute("type","text/css");for(var v="",B="",x=0;x<this.extFonts.length;x++){var C=this.extFonts[x].name,y=this.extFonts[x].url;0==y.indexOf(Editor.GOOGLE_FONTS)?v+="@import url("+y+");\n":B+='@font-face {\nfont-family: "'+
-C+'";\nsrc: url("'+y+'");\n}\n'}q.appendChild(t.createTextNode(v+B));z.getElementsByTagName("defs")[0].appendChild(q)}null!=u&&(this.stylesheet=u,this.refresh());return z};var z=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=z.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
+null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var d in a)this.globalVars[d]=a[d]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var d=y.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[a]);
+return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,d,b,c,e,g,m,f,n,p,k,l){var t=null;l||null==this.themes||"darkTheme"!=this.defaultThemeName||(t=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
+this.refresh());var z=A.apply(this,arguments);if(k&&null!=this.extFonts&&0<this.extFonts.length){var u=z.ownerDocument,q=null!=u.createElementNS?u.createElementNS(mxConstants.NS_SVG,"style"):u.createElement("style");null!=u.setAttributeNS?q.setAttributeNS("type","text/css"):q.setAttribute("type","text/css");for(var v="",B="",x=0;x<this.extFonts.length;x++){var C=this.extFonts[x].name,y=this.extFonts[x].url;0==y.indexOf(Editor.GOOGLE_FONTS)?v+="@import url("+y+");\n":B+='@font-face {\nfont-family: "'+
+C+'";\nsrc: url("'+y+'");\n}\n'}q.appendChild(u.createTextNode(v+B));z.getElementsByTagName("defs")[0].appendChild(q)}null!=t&&(this.stylesheet=t,this.refresh());return z};var z=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=z.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var e=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=c.innerHTML&&(e=a.text.value,a.text.value=c.innerHTML,d.apply(this,arguments),a.text.value=e)}}else d.apply(this,arguments)}}return a};var B=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){B.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
@@ -9606,39 +9608,39 @@ STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people
"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var 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 D=mxMarker.createMarker;mxMarker.createMarker=
-function(a,d,b,c,e,g,m,f,n,p){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return D.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){z.value=Math.max(1,Math.min(f,Math.max(parseInt(z.value),parseInt(u.value))));u.value=Math.max(1,Math.min(f,Math.min(parseInt(z.value),parseInt(u.value))))}function c(d){function b(d,b,g){var m=d.useCssTransforms,f=d.currentTranslate,n=d.currentScale,p=d.view.translate,k=
-d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var l=d.getGraphBounds(),u=0,t=0,z=qa.get(),q=1/d.pageScale,x=B.checked;if(x)var q=parseInt(K.value),C=parseInt(la.value),q=Math.min(z.height*C/(l.height/d.view.scale),z.width*q/(l.width/d.view.scale));else q=parseInt(v.value)/(100*d.pageScale),isNaN(q)&&(c=1/d.pageScale,v.value="100 %");z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*
-c);z.height=Math.ceil(z.height*c);q*=c;!x&&d.pageVisible?(l=d.getPageLayout(),u-=l.x*z.width,t-=l.y*z.height):x=!0;if(null==b){b=PrintDialog.createPrintPreview(d,q,z,0,u,t,x);b.pageSelector=!1;b.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(b.title=u.getTitle());var y=b.writeHead;b.writeHead=function(b){y.apply(this,arguments);mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),b.writeln("</style>"));
+function(a,d,b,c,e,g,m,f,n,p){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return D.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){z.value=Math.max(1,Math.min(f,Math.max(parseInt(z.value),parseInt(t.value))));t.value=Math.max(1,Math.min(f,Math.min(parseInt(z.value),parseInt(t.value))))}function c(d){function b(d,b,g){var m=d.useCssTransforms,f=d.currentTranslate,n=d.currentScale,p=d.view.translate,k=
+d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var l=d.getGraphBounds(),t=0,u=0,z=qa.get(),q=1/d.pageScale,x=B.checked;if(x)var q=parseInt(K.value),C=parseInt(la.value),q=Math.min(z.height*C/(l.height/d.view.scale),z.width*q/(l.width/d.view.scale));else q=parseInt(v.value)/(100*d.pageScale),isNaN(q)&&(c=1/d.pageScale,v.value="100 %");z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*
+c);z.height=Math.ceil(z.height*c);q*=c;!x&&d.pageVisible?(l=d.getPageLayout(),t-=l.x*z.width,u-=l.y*z.height):x=!0;if(null==b){b=PrintDialog.createPrintPreview(d,q,z,0,t,u,x);b.pageSelector=!1;b.mathEnabled=!1;t=a.getCurrentFile();null!=t&&(b.title=t.getTitle());var y=b.writeHead;b.writeHead=function(b){y.apply(this,arguments);mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),b.writeln("</style>"));
null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var e=d.extFonts[c].name,g=d.extFonts[c].url;0==g.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+g+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+e+'";\n\tsrc: url("'+g+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var D=
-b.renderPage;b.renderPage=function(d,b,c,e,g,m){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=D.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}u=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());b.open(null,null,g,!0);null!=u&&(e.stylesheet=u,e.refresh())}else{z=
-d.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";b.backgroundColor=z;b.autoOrigin=x;b.appendGraph(d,q,u,t,g,!0);if(null!=d.extFonts&&null!=b.wnd)for(g=0;g<d.extFonts.length;g++)u=d.extFonts[g].name,t=d.extFonts[g].url,0==t.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+t+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+u+'";\n\tsrc: url("'+t+'");\n}'),
-b.wnd.document.writeln("</style>"))}m&&(d.useCssTransforms=m,d.currentTranslate=f,d.currentScale=n,d.view.translate=p,d.view.scale=k);return b}var c=parseInt(ia.value)/100;isNaN(c)&&(c=1,ia.value="100 %");var c=.75*c,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=u.value,f=z.value,p=!k.checked,l=null;p&&(p=m==n&&f==n);if(!p&&null!=a.pages&&a.pages.length){var t=0,p=a.pages.length-1;k.checked||(t=parseInt(m)-1,p=parseInt(f)-
-1);for(var q=t;q<=p;q++){var x=a.pages[q],m=x==a.currentPage?e:null;if(null==m){var m=a.createTemporaryGraph(e.stylesheet),f=!0,t=!1,C=null,y=null;null==x.viewState&&null==x.root&&a.updatePageRoot(x);null!=x.viewState&&(f=x.viewState.pageVisible,t=x.viewState.mathEnabled,C=x.viewState.background,y=x.viewState.backgroundImage,m.extFonts=x.viewState.extFonts);m.background=C;m.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;m.pageVisible=f;m.mathEnabled=t;var D=m.getGlobalVariable;m.getGlobalVariable=
+b.renderPage;b.renderPage=function(d,b,c,e,g,m){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=D.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}t=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(t=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());b.open(null,null,g,!0);null!=t&&(e.stylesheet=t,e.refresh())}else{z=
+d.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";b.backgroundColor=z;b.autoOrigin=x;b.appendGraph(d,q,t,u,g,!0);if(null!=d.extFonts&&null!=b.wnd)for(g=0;g<d.extFonts.length;g++)t=d.extFonts[g].name,u=d.extFonts[g].url,0==u.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+u+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+t+'";\n\tsrc: url("'+u+'");\n}'),
+b.wnd.document.writeln("</style>"))}m&&(d.useCssTransforms=m,d.currentTranslate=f,d.currentScale=n,d.view.translate=p,d.view.scale=k);return b}var c=parseInt(ia.value)/100;isNaN(c)&&(c=1,ia.value="100 %");var c=.75*c,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=t.value,f=z.value,p=!k.checked,l=null;p&&(p=m==n&&f==n);if(!p&&null!=a.pages&&a.pages.length){var u=0,p=a.pages.length-1;k.checked||(u=parseInt(m)-1,p=parseInt(f)-
+1);for(var q=u;q<=p;q++){var x=a.pages[q],m=x==a.currentPage?e:null;if(null==m){var m=a.createTemporaryGraph(e.stylesheet),f=!0,u=!1,C=null,y=null;null==x.viewState&&null==x.root&&a.updatePageRoot(x);null!=x.viewState&&(f=x.viewState.pageVisible,u=x.viewState.mathEnabled,C=x.viewState.background,y=x.viewState.backgroundImage,m.extFonts=x.viewState.extFonts);m.background=C;m.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;m.pageVisible=f;m.mathEnabled=u;var D=m.getGlobalVariable;m.getGlobalVariable=
function(d){return"page"==d?x.getName():"pagenumber"==d?q+1:"pagecount"==d?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(x);m.model.setRoot(x.root)}l=b(m,l,q!=p);m!=e&&m.container.parentNode.removeChild(m.container)}}else l=b(e);null==l?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(l.mathEnabled&&(p=l.wnd.document,d&&(l.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
l.closeDocument(),!l.mathEnabled&&d&&PrintDialog.printPreview(l));null!=g&&(e.stylesheet=g,e.refresh())}var e=a.editor.graph,g=document.createElement("div"),m=document.createElement("h3");m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,d||mxResources.get("print"));g.appendChild(m);var f=1,n=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);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));p.appendChild(m);mxUtils.br(p);var l=k.cloneNode(!0);k.setAttribute("checked","checked");l.setAttribute("value","range");p.appendChild(l);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");p.appendChild(m);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";p.appendChild(u);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));p.appendChild(m);var z=u.cloneNode(!0);p.appendChild(z);mxEvent.addListener(u,"focus",function(){l.checked=!0});mxEvent.addListener(z,"focus",function(){l.checked=!0});mxEvent.addListener(u,"change",b);mxEvent.addListener(z,"change",b);if(null!=a.pages&&(f=a.pages.length,
-null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){n=m+1;u.value=n;z.value=n;break}u.setAttribute("max",f);z.setAttribute("max",f);a.isPagesEnabled()?1<f&&(g.appendChild(p),l.checked=!0):l.checked=!0;var t=document.createElement("div");t.style.marginBottom="10px";var q=document.createElement("input");q.style.marginRight="8px";q.setAttribute("value","adjust");q.setAttribute("type","radio");q.setAttribute("name","printZoom");t.appendChild(q);m=document.createElement("span");
-mxUtils.write(m,mxResources.get("adjustTo"));t.appendChild(m);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";t.appendChild(v);mxEvent.addListener(v,"focus",function(){q.checked=!0});g.appendChild(t);var p=p.cloneNode(!1),B=q.cloneNode(!0);B.setAttribute("value","fit");q.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
-m.appendChild(B);p.appendChild(m);t=document.createElement("table");t.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),y=C.cloneNode(!0),D=document.createElement("td"),A=D.cloneNode(!0),G=D.cloneNode(!0),E=D.cloneNode(!0),F=D.cloneNode(!0),I=D.cloneNode(!0);D.style.textAlign="right";E.style.textAlign="right";mxUtils.write(D,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
-K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";A.appendChild(K);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));G.appendChild(m);mxUtils.write(E,mxResources.get("fitToBy"));var la=K.cloneNode(!0);F.appendChild(la);mxEvent.addListener(K,"focus",function(){B.checked=!0});mxEvent.addListener(la,"focus",function(){B.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));I.appendChild(m);C.appendChild(D);
-C.appendChild(A);C.appendChild(G);y.appendChild(E);y.appendChild(F);y.appendChild(I);x.appendChild(C);x.appendChild(y);t.appendChild(x);p.appendChild(t);g.appendChild(p);p=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));p.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var qa=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
+"margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");p.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));p.appendChild(m);mxUtils.br(p);var l=k.cloneNode(!0);k.setAttribute("checked","checked");l.setAttribute("value","range");p.appendChild(l);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");p.appendChild(m);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);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));p.appendChild(m);var z=t.cloneNode(!0);p.appendChild(z);mxEvent.addListener(t,"focus",function(){l.checked=!0});mxEvent.addListener(z,"focus",function(){l.checked=!0});mxEvent.addListener(t,"change",b);mxEvent.addListener(z,"change",b);if(null!=a.pages&&(f=a.pages.length,
+null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){n=m+1;t.value=n;z.value=n;break}t.setAttribute("max",f);z.setAttribute("max",f);a.isPagesEnabled()?1<f&&(g.appendChild(p),l.checked=!0):l.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var q=document.createElement("input");q.style.marginRight="8px";q.setAttribute("value","adjust");q.setAttribute("type","radio");q.setAttribute("name","printZoom");u.appendChild(q);m=document.createElement("span");
+mxUtils.write(m,mxResources.get("adjustTo"));u.appendChild(m);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";u.appendChild(v);mxEvent.addListener(v,"focus",function(){q.checked=!0});g.appendChild(u);var p=p.cloneNode(!1),B=q.cloneNode(!0);B.setAttribute("value","fit");q.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+m.appendChild(B);p.appendChild(m);u=document.createElement("table");u.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),y=C.cloneNode(!0),D=document.createElement("td"),A=D.cloneNode(!0),H=D.cloneNode(!0),E=D.cloneNode(!0),F=D.cloneNode(!0),I=D.cloneNode(!0);D.style.textAlign="right";E.style.textAlign="right";mxUtils.write(D,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
+K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";A.appendChild(K);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));H.appendChild(m);mxUtils.write(E,mxResources.get("fitToBy"));var la=K.cloneNode(!0);F.appendChild(la);mxEvent.addListener(K,"focus",function(){B.checked=!0});mxEvent.addListener(la,"focus",function(){B.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));I.appendChild(m);C.appendChild(D);
+C.appendChild(A);C.appendChild(H);y.appendChild(E);y.appendChild(F);y.appendChild(I);x.appendChild(C);x.appendChild(y);u.appendChild(x);p.appendChild(u);g.appendChild(p);p=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));p.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var qa=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
p.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));p.appendChild(m);var ia=document.createElement("input");ia.style.cssText="margin:0 8px 0 8px;";ia.setAttribute("value","100 %");ia.style.width="60px";p.appendChild(ia);g.appendChild(p);m=document.createElement("div");m.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);a.isOffline()||
-(t=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),t.className="geBtn",m.appendChild(t));PrintDialog.previewEnabled&&(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),t.className="geBtn",m.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});t.className="geBtn gePrimaryBtn";m.appendChild(t);a.editor.cancelFirst||m.appendChild(p);
+(u=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),u.className="geBtn",m.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),u.className="geBtn",m.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});u.className="geBtn gePrimaryBtn";m.appendChild(u);a.editor.cancelFirst||m.appendChild(p);
g.appendChild(m);this.container=g};var E=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)):(E.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var F=document.createElement("canvas"),
-I=new Image;I.onload=function(){try{F.getContext("2d").drawImage(I,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};I.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(G){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.4.4";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
-"\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
-!EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,
-topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,e,f,k,l){k=null!=k?k:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
-null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=d+"/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(v){}try{l||null==window.console||
-console.error(k,a,b,c,e,f)}catch(v){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(m){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>
-b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(m){}};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=g;g+=d;return a.substring(b,
-g)}function e(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var g=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=e(a);var m=d(a,4);if(null!=b&&b(g-8,m,c))break;value=d(a,c);d(a,4);if("IEND"==m)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
-EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+I=new Image;I.onload=function(){try{F.getContext("2d").drawImage(I,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};I.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(H){}})();
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.4.5";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
+EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
+EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&!EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},
+gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,e,f,k,l){k=null!=k?k:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
+-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=d+"/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(v){}try{l||
+null==window.console||console.error(k,a,b,c,e,f)}catch(v){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(m){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=
+null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(m){}};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=
+g;g+=d;return a.substring(b,g)}function e(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var g=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=e(a);var m=d(a,4);if(null!=b&&b(g-8,m,c))break;value=d(a,c);d(a,4);if("IEND"==m)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml=
+'<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(u){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{b=
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{b=
document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
function(a,b,c){c=null!=c?c:24;var 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}),e=d.spin;d.spin=function(c,g){var m=!1;this.active||(e.call(this,c),this.active=!0,null!=g&&(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=
@@ -9647,7 +9649,7 @@ function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.r
d.pause=function(){return function(){}};return d};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c=d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,
-">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(d),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=k?mxUtils.getXml(k):""}catch(t){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
+">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(d),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=k?mxUtils.getXml(k):""}catch(u){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(c[e]));
null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),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,f,k,l,q,v,x,y){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;v=null!=v?v:!0;var d,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?d="_blank":g=d=e;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){if(y){var n=a.ownerDocument.createElement("diagram");n.setAttribute("id",
@@ -9657,8 +9659,8 @@ a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a),1<m.getElement
e,null,q,v,g);return y};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):
(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));d.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
e);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(e));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return d};EditorUi.prototype.anonymizeString=function(a,b){for(var d=[],c=0;c<a.length;c++){var e=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*Math.random()))):e.toUpperCase()!=e?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(e)?d.push(" "):d.push("?"):d.push(b?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var d=0;d<a[EditorUi.DIFF_INSERT].length;d++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(b)}catch(u){a[EditorUi.DIFF_INSERT][d].data=
-u.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][c];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(d=mxUtils.bind(this,function(a){var d=e.cells[a];if(null!=d){for(var b in d)null!=d[b].value&&(d[b].value="["+d[b].value.length+"]"),null!=d[b].xmlValue&&(d[b].xmlValue="["+d[b].xmlValue.length+"]"),null!=d[b].style&&(d[b].style="["+d[b].style.length+"]"),0==Object.keys(d[b]).length&&delete d[b];0==Object.keys(d).length&&
+/\s/.test(e)?d.push(" "):d.push("?"):d.push(b?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var d=0;d<a[EditorUi.DIFF_INSERT].length;d++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(b)}catch(t){a[EditorUi.DIFF_INSERT][d].data=
+t.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][c];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(d=mxUtils.bind(this,function(a){var d=e.cells[a];if(null!=d){for(var b in d)null!=d[b].value&&(d[b].value="["+d[b].value.length+"]"),null!=d[b].xmlValue&&(d[b].xmlValue="["+d[b].xmlValue.length+"]"),null!=d[b].style&&(d[b].style="["+d[b].style.length+"]"),0==Object.keys(d[b]).length&&delete d[b];0==Object.keys(d).length&&
delete e.cells[a]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var d=0;d<a.attributes.length;d++)"as"!=a.attributes[d].name&&a.setAttribute(a.attributes[d].name,this.anonymizeString(a.attributes[d].value,b));if(null!=a.childNodes)for(d=
0;d<a.childNodes.length;d++)this.anonymizeAttributes(a.childNodes[d],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var d=a.getElementsByTagName("mxCell"),c=0;c<d.length;c++)null!=d[c].getAttribute("value")&&d[c].setAttribute("value","["+d[c].getAttribute("value").length+"]"),null!=d[c].getAttribute("xmlValue")&&d[c].setAttribute("xmlValue","["+d[c].getAttribute("xmlValue").length+"]"),null!=d[c].getAttribute("style")&&d[c].setAttribute("style","["+d[c].getAttribute("style").length+"]"),null!=
d[c].parentNode&&"root"!=d[c].parentNode.nodeName&&null!=d[c].parentNode.parentNode&&(d[c].setAttribute("id",d[c].parentNode.getAttribute("id")),d[c].parentNode.parentNode.replaceChild(d[c],d[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&d.invalidChecksum?d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),
@@ -9675,24 +9677,24 @@ null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages
[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var f=this.editor.graph.getModel(),k=f.getChildren(f.root),c=0;c<k.length;c++){var l=k[c];f.setVisible(l,a[l.id]||!1)}}catch(v){}};EditorUi.prototype.getBaseFilename=function(a){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():
this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(a,b,c,e,f,k,l,q,v,x,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!f),
g=d+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,f,null,null,null,b);this.saveData(g,a,m,"text/xml")}else if("html"==a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(g,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=d+".png":"jpeg"==a&&(g=d+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;
-null!=k&&(this.editor.graph.pageVisible=k);var g=this.createDownloadRequest(d,a,e,b,l,f,q,v,x,y);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var n=null,p=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(n)}))});if("svg"==a){var u=this.editor.graph.background;if(l||u==mxConstants.NONE)u=
-null;var t=this.editor.graph.getSvg(u,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(t);this.editor.convertImages(t,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=d+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),e)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=
+null!=k&&(this.editor.graph.pageVisible=k);var g=this.createDownloadRequest(d,a,e,b,l,f,q,v,x,y);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var n=null,p=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(n)}))});if("svg"==a){var t=this.editor.graph.background;if(l||t==mxConstants.NONE)t=
+null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=d+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),e)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=
function(a,b,c,e,f,k,l,q,v,x){var d=this.editor.graph,g=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==k?!1:"xmlpng"!=b);var m="",n="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==b&&0==k&&(n="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){m="&from="+k;break}k=d.background;"png"!=b&&"pdf"!=b||!f?f||
null!=k&&k!=mxConstants.NONE||(k="#ffffff"):k=mxConstants.NONE;f={globalVars:d.getExportVariables()};v&&(f.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+m+n+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=l?"&scale="+l:"")+(null!=q?"&border="+q:""))};EditorUi.prototype.setMode=function(a,
b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,e=mxUtils.bind(this,function(c){var e=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<e.length&&(e+="\n"),e+=c);c=new LocalFile(this,"csv"!=a.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(e,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var g=null!=a.interval?parseInt(a.interval):6E4,m=null,f=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){d===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
n=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(f,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();f()}));n();f()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var g=a.url;/^https?:\/\//.test(g)&&!this.editor.isCorsEnabledForUrl(g)&&(g=PROXY_URL+"?url="+encodeURIComponent(g));this.editor.loadUrl(g,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else e("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=
new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,f=e.getModel();f.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var l=f.getCell(a.getAttribute("id"));if(null!=l){try{var v=a.getAttribute("value");if(null!=v){var x=
-mxUtils.parseXml(v).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(l,x);else for(var y=x.attributes,A=0;A<y.length;A++)e.setAttributeForCell(l,y[A].nodeName,0<y[A].nodeValue.length?y[A].nodeValue:null)}}catch(G){null!=window.console&&console.log("Error in value for "+l.id+": "+G)}try{var z=a.getAttribute("style");null!=z&&e.model.setStyle(l,z)}catch(G){null!=window.console&&console.log("Error in style for "+l.id+": "+G)}try{var B=a.getAttribute("icon");if(null!=B){var C=
-0<B.length?JSON.parse(B):null;null!=C&&C.append||e.removeCellOverlays(l);null!=C&&e.addCellOverlay(l,d(C))}}catch(G){null!=window.console&&console.log("Error in icon for "+l.id+": "+G)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),E=e.getCellGeometry(l);if(null!=E){E=E.clone();for(key in D){var F=parseFloat(D[key]);"dx"==key?E.x+=F:"dy"==key?E.y+=F:"dw"==key?E.width+=F:"dh"==key?E.height+=F:E[key]=parseFloat(D[key])}e.model.setGeometry(l,E)}}}catch(G){null!=window.console&&
-console.log("Error in icon for "+l.id+": "+G)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(a.firstChild)).decode(I,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
+mxUtils.parseXml(v).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(l,x);else for(var y=x.attributes,A=0;A<y.length;A++)e.setAttributeForCell(l,y[A].nodeName,0<y[A].nodeValue.length?y[A].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+l.id+": "+H)}try{var z=a.getAttribute("style");null!=z&&e.model.setStyle(l,z)}catch(H){null!=window.console&&console.log("Error in style for "+l.id+": "+H)}try{var B=a.getAttribute("icon");if(null!=B){var C=
+0<B.length?JSON.parse(B):null;null!=C&&C.append||e.removeCellOverlays(l);null!=C&&e.addCellOverlay(l,d(C))}}catch(H){null!=window.console&&console.log("Error in icon for "+l.id+": "+H)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),E=e.getCellGeometry(l);if(null!=E){E=E.clone();for(key in D){var F=parseFloat(D[key]);"dx"==key?E.x+=F:"dy"==key?E.y+=F:"dw"==key?E.width+=F:"dh"==key?E.height+=F:E[key]=parseFloat(D[key])}e.model.setGeometry(l,E)}}}catch(H){null!=window.console&&
+console.log("Error in icon for "+l.id+": "+H)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(a.firstChild)).decode(I,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",e=d.lastIndexOf(".");0<=e&&(c=d.substring(e),d=d.substring(0,e));if(b)var g=new Date,e=g.getFullYear(),f=g.getMonth()+1,k=g.getDate(),l=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+f+"-"+k+"-"+l+"-"+x+"-"+g));
return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a,b){var d=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();
this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){this.fileLoadedError=t;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+t.message,label:"stack_"+t.stack})}catch(q){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});b?g():this.handleError(t,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,e=new mxCodec;null!=b&&(b.byteCount=
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(q){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});b?g():this.handleError(u,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,e=new mxCodec;null!=b&&(b.byteCount=
0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var g=0;g<a.length;g++){this.updatePageRoot(a[g]);var f=a[g].node.cloneNode(!1);f.removeAttribute("name");c.root=a[g].root;var k=e.encode(c);this.editor.graph.saveViewState(a[g].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");f.appendChild(k);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(f,function(a,d,b,c){return!c||"mxGeometry"!=
a.nodeName&&"mxPoint"!=a.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?c&&"mxCell"==a.nodeName&&"previous"==d?null:b:Math.round(b)},b)<<0}return d};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var e=0;e<a.attributes.length;e++){var g=a.attributes[e].name,
f=null!=b?b(a,g,a.attributes[e].value,!0):a.attributes[e].value;null!=f&&(d^=this.hashValue(g,b,c)+this.hashValue(f,b,c))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)d=(d<<5)-d+this.hashValue(a.childNodes[e],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
@@ -9700,27 +9702,27 @@ function(a,b,c,e,f,k,l){};EditorUi.prototype.isScratchpadEnabled=function(){retu
b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var d=this.sidebar.palettes[a];if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};
EditorUi.prototype.repositionLibrary=function(a){var d=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a,b){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(d.documentElement));
this.libraryLoaded(a,c,d.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=
-null,f=mxUtils.bind(this,function(d,b){0==d.length&&a.isEditable()?(null==g&&(g=document.createElement("div"),g.className="geDropTarget",mxUtils.write(g,mxResources.get("dragElementsHere"))),b.appendChild(g)):this.addLibraryEntries(d,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),c,null!=e?e:!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var k=m.parentNode.previousSibling;e=k.getAttribute("title");
-null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");k.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.cursor="pointer";l.style.margin="0 3px";var A=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.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!=A?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var z=this.editor.graph,B=null,
-C=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=l.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",n.insertBefore(B,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),
-b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),k.style.paddingRight=18*n.childNodes.length+"px")})):null==A&&(A=l.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),n.insertBefore(A,n.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==A||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+
-"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(d)})),k.style.paddingRight=18*n.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,d,c,e){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var n=z.getCellGeometry(a[f]);null!=n&&n.translate(-d.x,-d.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&
+null,f=mxUtils.bind(this,function(b,d){0==b.length&&a.isEditable()?(null==g&&(g=document.createElement("div"),g.className="geDropTarget",mxUtils.write(g,mxResources.get("dragElementsHere"))),d.appendChild(g)):this.addLibraryEntries(b,d)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),c,null!=e?e:!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var n=m.parentNode.previousSibling;e=n.getAttribute("title");
+null!=e&&0<e.length&&".scratchpad"!=a.title&&n.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");n.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.cursor="pointer";l.style.margin="0 3px";var A=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var d=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d();mxEvent.consume(b)}}));if(a.isEditable()){var z=this.editor.graph,B=null,
+C=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=l.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",k.insertBefore(B,k.firstChild),n.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),
+b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),n.style.paddingRight=18*k.childNodes.length+"px")})):null==A&&(A=l.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),k.insertBefore(A,k.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==A||a.isModified()||(n.style.paddingRight=18*k.childNodes.length+
+"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(d)})),n.style.paddingRight=18*k.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,d,c,e){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var k=z.getCellGeometry(a[f]);null!=k&&k.translate(-d.x,-d.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&
(a.title=e);b.push(a);D(c);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),F=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=z.getSelectionCells(),b=z.view.getBounds(d),c=z.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=z.view.translate.x;b.y-=z.view.translate.y;
E(d,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.first&&(z.graphHandler.suspend(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),m.style.backgroundColor="#f1f3f4",m.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(m.style.backgroundColor=
"",m.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,F(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.first&&(z.graphHandler.resume(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),m.style.backgroundColor="",m.style.cursor="",z.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,
-function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,n,k,p,l,z,u){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,k,p),d)],d[0].vertex=!0,E(d,new mxRectangle(0,0,k,p),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 t=!1,q=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var n=
-JSON.parse(mxUtils.getTextContent(e.documentElement));f(n,m);b=b.concat(n);D(a);this.spinner.stop();t=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var k=e.documentElement.getElementsByTagName("diagram"),n=0;n<k.length;n++){var p=this.stringToCells(Editor.getDiagramNodeXml(k[n])),l=this.editor.graph.getBoundingBoxFromGeometry(p);E(p,new mxRectangle(0,0,l.width,l.height),a)}t=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=u&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(u,function(a){q(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,l)&&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(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));n.insertBefore(l,n.firstChild);mxEvent.addListener(l,"click",C);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==
-m&&C(a)});e=l.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));n.insertBefore(e,n.firstChild);mxEvent.addListener(e,"click",F);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(a)})),n.insertBefore(e,n.firstChild))}k.appendChild(n);k.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],e=c.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(e=this.stringToCells(Graph.decompress(c.xml)),
+function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,k,n,p,l,t,z){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,p),d)],d[0].vertex=!0,E(d,new mxRectangle(0,0,n,p),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 u=!1,q=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var k=
+JSON.parse(mxUtils.getTextContent(e.documentElement));f(k,m);b=b.concat(k);D(a);this.spinner.stop();u=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var p=this.stringToCells(Editor.getDiagramNodeXml(n[k])),l=this.editor.graph.getBoundingBoxFromGeometry(p);E(p,new mxRectangle(0,0,l.width,l.height),a)}u=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=z&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(z,function(a){q(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,l)&&null!=z?this.parseFile(z,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(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));k.insertBefore(l,k.firstChild);mxEvent.addListener(l,"click",C);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==
+m&&C(a)});e=l.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));k.insertBefore(e,k.firstChild);mxEvent.addListener(e,"click",F);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(a)})),k.insertBefore(e,k.firstChild))}n.appendChild(k);n.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],e=c.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(e=this.stringToCells(Graph.decompress(c.xml)),
0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,c,e,f){a=new ImageDialog(this,a,b,c,e,f);this.showDialog(a.container,Graph.fileSupport?
-480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,d){if(!d){var b=new ChangePageSetup(this,null,a);b.ignoreColor=!0;this.editor.graph.model.execute(b)}});var d=new BackgroundImageDialog(this,a,b);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,f){a=new LibraryDialog(this,a,b,c,e,f);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
+480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,b){if(!b){var d=new ChangePageSetup(this,null,a);d.ignoreColor=!0;this.editor.graph.model.execute(d)}});var d=new BackgroundImageDialog(this,a,b);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,f){a=new LibraryDialog(this,a,b,c,e,f);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow=
"hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));
a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e,f,k,l){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{l?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(B){}if(null!=g||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok"),
@@ -9729,7 +9731,7 @@ if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid
p);this.handleError(a,b,c,e,f)}),n,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<b.length;a++){var d=document.createElement("option");mxUtils.write(d,b[a].displayName);d.value=a;e.appendChild(d);d=document.createElement("option");d.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(d,"<"+b[a].email+">");d.setAttribute("disabled","disabled");e.appendChild(d)}d=document.createElement("option");mxUtils.write(d,mxResources.get("addAccount"));d.value=b.length;
e.appendChild(d)}var b=this.drive.getUsersList(),d=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+": ");d.appendChild(c);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var d=e.value,c=b.length!=d;c&&this.drive.setUser(b[d]);this.drive.authorize(c,mxUtils.bind(this,function(){c||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
!0)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(d.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=g.message?l=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error?l=mxUtils.htmlEntities(g.response.error):"undefined"!==typeof window.App&&(g.code==App.ERROR_TIMEOUT?l=mxUtils.htmlEntities(mxResources.get("timeout")):
-g.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var z=k=null;null!=g&&null!=g.helpLink&&(k=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(g.helpLink)}));this.showError(b,l,m,c,n,null,null,k,z,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b,c){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,c||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,c,e,
+g.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var t=k=null;null!=g&&null!=g.helpLink&&(k=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(g.helpLink)}));this.showError(b,l,m,c,n,null,null,k,t,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b,c){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,c||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,c,e,
f,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,f,null,null,null,null,g);this.showDialog(a.container,340,46+g,!0,k);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+
"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(d);mxUtils.write(e,b);document.body.appendChild(e);
@@ -9748,7 +9750,7 @@ a+"</html>"):(a=c?a:btoa(unescape(encodeURIComponent(a))),d.document.write('<htm
"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);else{this.exportDialog=document.createElement("div");var c=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=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.editor.exportToCanvas(mxUtils.bind(this,function(a){e.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.style.backgroundColor="white";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);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,5);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
+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);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
Editor.cameraLargeImage,mxResources.get("export"))}c.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,f){this.isLocalFileSave()?this.saveLocalFile(c,a,e,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,f,b,d)}),c,f,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,f,k,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var g=4>=d?2:6<d?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
function(a,d){if("_blank"==d||null!=a&&0<a.length){var g=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=g&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?g.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){k=null!=k?k:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,k,!0,d,c)}catch(B){this.handleError(B)}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,k,!0,d,c)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,l,null,1<d,g,e,k,f);d=this.isServices(d)?4<d?390:270:160;this.showDialog(a.container,380,d,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
@@ -9763,41 +9765,42 @@ g:"background-position:center center;background-repeat:no-repeat;background-imag
"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",f=null,f=mxUtils.button("",
mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;d()});mxEvent.consume(a)}));d();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 g},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createUrlParameters=
function(a,b,c,e,f,k,l){l=null!=l?l:[];e&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&l.push("edit="+encodeURIComponent(f)),k&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&l.push("page-id="+this.currentPage.getId());return l};EditorUi.prototype.createLink=function(a,b,c,e,f,k,l,q,
-v){v=null!=v?v:this.createUrlParameters(a,b,c,e,f,k);a=this.getCurrentFile();b=!0;null!=l?c="#U"+encodeURIComponent(l):(a=this.getCurrentFile(),q||null==a||a.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&v.push("title="+encodeURIComponent(a.getTitle()));return(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<v.length?"?"+v.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,f,k,l,q,v,x,y){this.getBasenames();var d={};""!=f&&f!=mxConstants.NONE&&(d.highlight=f);"auto"!==e&&(d.target=e);v||(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);q&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),d.toolbar=c.join(" "));null!=x&&0<x.length&&(d.edit=x);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";y(b,'<script type="text/javascript" src="'+
-(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.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";
-d.appendChild(g);var f=document.createElement("div");f.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");g=m.cloneNode(!0);g.setAttribute("value","copy");f.appendChild(g);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));
-f.appendChild(k);mxUtils.br(f);f.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));f.appendChild(k);var l=this.getCurrentFile();null==c&&null!=l&&l.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),f.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));
-g.setAttribute("checked","checked");null==c&&m.setAttribute("disabled","disabled");d.appendChild(f);var n=this.addLinkSection(d),A=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value="100%";d.appendChild(z);var B=this.addCheckbox(d,mxResources.get("fit"),!0),f=null!=this.pages&&1<this.pages.length,C=
-C=this.addCheckbox(d,mxResources.get("allPages"),f,!f),D=this.addCheckbox(d,mxResources.get("layers"),!0),E=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,E),I=F.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&E.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,
-mxUtils.bind(this,function(){e(m.checked?c:null,A.checked,z.value,n.getTarget(),n.getColor(),B.checked,C.checked,D.checked,E.checked,F.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,f,k,l){l=document.createElement("div");l.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,a||mxResources.get("link"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(d);
-var g=this.getCurrentFile(),d="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var d="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 n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);
-n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);l.appendChild(m);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"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 p=null,z=null;if(null!=c||null!=e)a+=30,mxUtils.write(l,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",
-p.value="100%",l.appendChild(p),mxUtils.write(l,mxResources.get("height")+":"),z=document.createElement("input"),z.setAttribute("type","text"),z.style.width="50px",z.style.marginLeft="6px",z.style.marginBottom="10px",z.value=e+"px",l.appendChild(z),mxUtils.br(l);var u=this.addLinkSection(l,k);c=null!=this.pages&&1<this.pages.length;var t=null;if(null==g||g.constructor!=window.DriveFile||b)t=this.addCheckbox(l,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(l,mxResources.get("lightbox"),!0),
-E=this.addEditButton(l,D),F=E.getEditInput(),I=this.addCheckbox(l,mxResources.get("layers"),!0);I.style.marginLeft=F.style.marginLeft;I.style.marginBottom="16px";I.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(I.removeAttribute("disabled"),F.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"));F.checked&&D.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});
-b=new CustomDialog(this,l,mxUtils.bind(this,function(){f(u.getTarget(),u.getColor(),null==t?!0:t.checked,D.checked,E.getLink(),I.checked,null!=p?p.value:null,null!=z?z.value:null)}),null,mxResources.get("create"),d);this.showDialog(b.container,340,254+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,f){var d=document.createElement("div");
-d.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:"+(f?"10":"4")+"px";d.appendChild(g);if(f){mxUtils.write(d,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";d.appendChild(m);mxUtils.write(d,
-mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";d.appendChild(k);mxUtils.br(d)}var l=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,p=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),
-g.background==mxConstants.NONE||null==g.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(m.value)/100||1,b=parseInt(k.value)||0;c(!l.checked,null!=n?n.checked:!1,null!=p?p.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,f,k,l,q){l=null!=l?l:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph,m="jpeg"==
-q?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 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%";d.appendChild(p);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 t=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=q),D=null;"dark"==uiTheme&&(D=this.addCheckbox(d,mxResources.get("dark"),!0),m+=26);var E=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight=
-"8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");k&&(d.appendChild(F),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),m+=26,mxEvent.addListener(E,"change",function(){E.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(F.setAttribute("checked","checked"),F.defaultChecked=!0);var I=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible),G=document.createElement("input");G.style.marginTop=
-"16px";G.style.marginRight="8px";G.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||G.setAttribute("disabled","disabled");b&&(d.appendChild(G),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),m+=26);var K=null;if("png"==q||"jpeg"==q)K=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),m+=26;var H=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=q),L=null!=this.pages&&1<this.pages.length,
-O=this.addCheckbox(d,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=q);O.style.marginLeft="24px";O.style.marginBottom="16px";L?m+=26:O.style.display="none";mxEvent.addListener(H,"change",function(){H.checked&&L?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});l&&L||O.setAttribute("disabled","disabled");var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";a=document.createElement("option");a.setAttribute("value",
-"auto");mxUtils.write(a,mxResources.get("automatic"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));J.appendChild(a);"svg"==q&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(J),mxUtils.br(d),mxUtils.br(d),m+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=
-u.value;this.lastExportZoom=p.value;f(p.value,t.checked,!E.checked,I.checked,H.checked,G.checked,u.value,F.checked,!O.checked,J.value,null!=K?K.checked:null,null!=D?D.checked:null)}),null,c,e);this.showDialog(c.container,340,m,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,f){var d=document.createElement("div");d.style.whiteSpace=
-"nowrap";var g=this.editor.graph;if(null!=b){var m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(m)}var k=this.addCheckbox(d,mxResources.get("fit"),!0),l=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible&&e,!e),n=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),z=this.addEditButton(d,p),B=z.getEditInput(),C=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(d,
-mxResources.get("layers"),C,!C);D.style.marginLeft=B.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(C&&D.removeAttribute("disabled"),B.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&p.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(k.checked,
-l.checked,n.checked,p.checked,z.getLink(),D.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,f,k,l,q){function d(b){var d=" ",m="";e&&(d=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');l('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+d+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.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){q({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),g.width*g.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*g.width)+"&h="+Math.round(2*g.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?d("data:image/png;base64,"+n.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,e,f,k,l){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),g=d.getElementsByTagName("a");if(null!=g)for(var m=0;m<g.length;m++){var n=g[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==g[m].getAttribute("target")&&g[m].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var p=" ",z="";e&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",z+="cursor:pointer;");a&&(z+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(a){l('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=z?' style="'+z+'"':"")+p+"/>")}))}else z="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),z+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),z+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=z&&d.setAttribute("style",z),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),l(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+v){v=null!=v?v:this.createUrlParameters(a,b,c,!1,f,k);a=this.getCurrentFile();b=!0;null!=l?c="#U"+encodeURIComponent(l):(a=this.getCurrentFile(),q||null==a||a.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&v.push("title="+encodeURIComponent(a.getTitle()));return(e?EditorUi.lightboxHost:
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<v.length?"?"+v.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,f,k,l,q,v,x,y){this.getBasenames();var d={};""!=f&&f!=mxConstants.NONE&&(d.highlight=f);"auto"!==e&&(d.target=e);v||(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);q&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),d.toolbar=c.join(" "));null!=x&&0<x.length&&(d.edit=x);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";
+y(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.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";d.appendChild(g);var f=document.createElement("div");f.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");g=m.cloneNode(!0);g.setAttribute("value","copy");f.appendChild(g);
+var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));f.appendChild(k);mxUtils.br(f);f.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));f.appendChild(k);var l=this.getCurrentFile();null==c&&null!=l&&l.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),f.appendChild(k),mxEvent.addListener(k,
+"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));g.setAttribute("checked","checked");null==c&&m.setAttribute("disabled","disabled");d.appendChild(f);var n=this.addLinkSection(d),A=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value="100%";d.appendChild(z);
+var B=this.addCheckbox(d,mxResources.get("fit"),!0),f=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(d,mxResources.get("allPages"),f,!f),D=this.addCheckbox(d,mxResources.get("layers"),!0),E=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,E),I=F.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&E.checked?F.getEditSelect().removeAttribute("disabled"):
+F.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(m.checked?c:null,A.checked,z.value,n.getTarget(),n.getColor(),B.checked,C.checked,D.checked,E.checked,F.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,f,k,l){l=document.createElement("div");l.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,a||mxResources.get("link"));d.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(d);var g=this.getCurrentFile(),d="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var d="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 n=document.createElement("div");n.style.whiteSpace=
+"normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);l.appendChild(m);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"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 p=null,z=null;if(null!=c||null!=e)a+=30,mxUtils.write(l,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight=
+"16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",l.appendChild(p),mxUtils.write(l,mxResources.get("height")+":"),z=document.createElement("input"),z.setAttribute("type","text"),z.style.width="50px",z.style.marginLeft="6px",z.style.marginBottom="10px",z.value=e+"px",l.appendChild(z),mxUtils.br(l);var t=this.addLinkSection(l,k);c=null!=this.pages&&1<this.pages.length;var u=null;if(null==g||g.constructor!=window.DriveFile||b)u=
+this.addCheckbox(l,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(l,mxResources.get("lightbox"),!0,null,null,!k),E=this.addEditButton(l,D),F=E.getEditInput();k&&(F.style.marginLeft=D.style.marginLeft,D.style.display="none",a-=30);var I=this.addCheckbox(l,mxResources.get("layers"),!0);I.style.marginLeft=F.style.marginLeft;I.style.marginBottom="16px";I.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(I.removeAttribute("disabled"),F.removeAttribute("disabled")):(I.setAttribute("disabled",
+"disabled"),F.setAttribute("disabled","disabled"));F.checked&&D.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,l,mxUtils.bind(this,function(){f(t.getTarget(),t.getColor(),null==u?!0:u.checked,D.checked,E.getLink(),I.checked,null!=p?p.value:null,null!=z?z.value:null)}),null,mxResources.get("create"),d);this.showDialog(b.container,340,254+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,f){var d=document.createElement("div");d.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:"+(f?"10":"4")+"px";d.appendChild(g);if(f){mxUtils.write(d,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";d.appendChild(m);mxUtils.write(d,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";d.appendChild(k);mxUtils.br(d)}var l=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
+n=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,p=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(m.value)/100||1,b=parseInt(k.value)||0;c(!l.checked,null!=n?n.checked:!1,null!=p?p.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(a,b,c,e,f,k,l,q){l=null!=l?l:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph,m="jpeg"==q?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 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%";d.appendChild(p);mxUtils.write(d,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder||"0";d.appendChild(t);mxUtils.br(d);var u=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=q),D=null;"dark"==uiTheme&&(D=this.addCheckbox(d,mxResources.get("dark"),!0),m+=26);var E=this.addCheckbox(d,
+mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");k&&(d.appendChild(F),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),m+=26,mxEvent.addListener(E,"change",function(){E.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(F.setAttribute("checked","checked"),
+F.defaultChecked=!0);var I=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible),H=document.createElement("input");H.style.marginTop="16px";H.style.marginRight="8px";H.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||H.setAttribute("disabled","disabled");b&&(d.appendChild(H),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),m+=26);var K=null;if("png"==q||"jpeg"==q)K=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
+!0),m+=26;var G=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=q),L=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(d,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=q);O.style.marginLeft="24px";O.style.marginBottom="16px";L?m+=26:O.style.display="none";mxEvent.addListener(G,"change",function(){G.checked&&L?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});l&&L||O.setAttribute("disabled","disabled");var J=document.createElement("select");
+J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));J.appendChild(a);"svg"==
+q&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(J),mxUtils.br(d),mxUtils.br(d),m+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=p.value;f(p.value,u.checked,!E.checked,I.checked,G.checked,H.checked,t.value,F.checked,!O.checked,J.value,null!=K?K.checked:null,null!=D?D.checked:null)}),null,c,e);this.showDialog(c.container,340,m,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(m)}var k=this.addCheckbox(d,mxResources.get("fit"),!0),l=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible&&e,
+!e),n=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),z=this.addEditButton(d,p),B=z.getEditInput(),C=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(d,mxResources.get("layers"),C,!C);D.style.marginLeft=B.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(C&&D.removeAttribute("disabled"),B.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));
+B.checked&&p.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(k.checked,l.checked,n.checked,p.checked,z.getLink(),D.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,f,k,l,q){function d(b){var d=" ",m="";e&&(d=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');l('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+d+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.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){q({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),g.width*g.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*g.width)+"&h="+Math.round(2*g.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?d("data:image/png;base64,"+
+n.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,c,e,f,k,l){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),g=d.getElementsByTagName("a");if(null!=g)for(var m=0;m<g.length;m++){var n=g[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==g[m].getAttribute("target")&&g[m].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));
+b&&this.editor.graph.addSvgShadow(d);if(c){var p=" ",z="";e&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",z+="cursor:pointer;");a&&
+(z+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(a){l('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=z?' style="'+z+'"':"")+p+"/>")}))}else z="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),z+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),z+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=z&&d.setAttribute("style",z),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),l(mxUtils.getXml(d))};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.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==
-a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(a=Editor.parseDiagramNode(d))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=c}return a};EditorUi.prototype.getPngFileProperties=function(a){var b=1,d=0;if(null!=a){if(a.hasAttribute("scale")){var c=
+a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(a=Editor.parseDiagramNode(d))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=c}return a};EditorUi.prototype.getPngFileProperties=function(a){var b=1,d=0;if(null!=a){if(a.hasAttribute("scale")){var c=
parseFloat(a.getAttribute("scale"));!isNaN(c)&&0<c&&(b=c)}a.hasAttribute("border")&&(c=parseInt(a.getAttribute("border")),!isNaN(c)&&0<c&&(d=c))}return{scale:b,border:d}};EditorUi.prototype.getEmbeddedPng=function(a,b,c,e,f){try{var d=this.editor.graph,g=null!=d.themes&&"darkTheme"==d.defaultThemeName,m=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),m=c;else if(g||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),k=d.getGlobalVariable,l=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:k.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(l.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(c){try{null==m&&(m=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=c.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
"tEXt","mxfile",encodeURIComponent(m));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(z){null!=b&&b(z)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,d.shadowVisible,null,d,f)}catch(y){null!=b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,f,k,l,q){q=null!=q?q:!0;l=b.background;l==mxConstants.NONE&&(l=null);k=b.getSvg(l,null,null,null,null,k);b.shadowVisible&&b.addSvgShadow(k);null!=a&&
@@ -9809,7 +9812,7 @@ var k=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!
l[n].getAttribute("id");l[n].removeAttribute("id");var z=this.updatePageRoot(new DiagramPage(l[n]));a[p]=l[n].getAttribute("id");var B=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[B+1]));g.model.execute(new ChangePage(this,z,z,B,!0));m.push(z)}this.updatePageLinks(a,m)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(d=g.importGraphModel(k,b,c,e),null!=d))for(n=0;n<d.length;n++)this.updatePageLinksForCell(a,d[n])}finally{g.model.endUpdate()}}}catch(C){if(f)throw C;this.handleError(C)}return d};
EditorUi.prototype.updatePageLinks=function(a,b){for(var d=0;d<b.length;d++)this.updatePageLinksForCell(a,b[d].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var d=document.createElement("div"),c=this.editor.graph,e=c.getLinkForCell(b);null!=e&&c.setLinkForCell(b,this.updatePageLink(a,e));if(c.isHtmlLabel(b)){d.innerHTML=c.sanitizeHtml(c.getLabel(b));for(var g=d.getElementsByTagName("a"),f=!1,k=0;k<g.length;k++)e=g[k].getAttribute("href"),null!=e&&(g[k].setAttribute("href",this.updatePageLink(a,
e)),f=!0);f&&c.labelChanged(b,d.innerHTML)}for(k=0;k<c.model.getChildCount(b);k++)this.updatePageLinksForCell(a,c.model.getChildAt(b,k))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var d=a[b.substring(b.indexOf(",")+1)];b=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));if(null!=c.actions){for(var e=0;e<c.actions.length;e++){var g=c.actions[e];null!=g.open&&"data:page/id,"==g.open.substring(0,
-13)&&(d=a[g.open.substring(g.open.indexOf(",")+1)],null!=d?g.open="data:page/id,"+d:delete g.open)}b="data:action/json,"+JSON.stringify(c)}}catch(t){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(e);
+13)&&(d=a[g.open.substring(g.open.indexOf(",")+1)],null!=d?g.open="data:page/id,"+d:delete g.open)}b="data:action/json,"+JSON.stringify(c)}}catch(u){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(e);
try{var g="UNKNOWN-VISIO",f=e.lastIndexOf(".");if(0<=f&&f<e.length)g=e.substring(f+1).toUpperCase();else{var m=e.lastIndexOf("/");0<=m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:g+"-MS-IMPORT-FILE",action:"filename_"+e,label:d?"remote":"local"})}catch(y){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",a,e);var k=new XMLHttpRequest;
k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(B){c({message:mxResources.get("errorLoadingFile")})}});d.readAsText(a)}else this.doImportVisio(a,b,c,e)}catch(z){c(z)}else c({})});k.send(d)}else try{this.doImportVisio(a,b,c,e)}catch(y){c(y)}}else this.spinner.stop(),
this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(p){c(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
@@ -9817,7 +9820,7 @@ this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadi
"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(p){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(p){null!=window.console&&
console.error(p),c(p)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,e){var d=this,g=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=
!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var g=parseFloat(b[0].getAttribute("width")),f=parseFloat(b[0].getAttribute("height"));c(d.convertDataUri(Editor.createSvgDataUri(a)),g,
-f)}else e({message:mxResources.get("invalidInput")})}catch(y){e(y)}})}catch(t){e(t)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?g():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",g):mxscript("js/extensions.min.js",g))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,e){function d(a,b,d){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|d>>6;c4=d&63;r="";r+=g(c1&63);r+=g(c2&63);r+=g(c3&63);return r+=g(c4&63)}function g(a){if(10>a)return String.fromCharCode(48+
+f)}else e({message:mxResources.get("invalidInput")})}catch(y){e(y)}})}catch(u){e(u)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?g():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",g):mxscript("js/extensions.min.js",g))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,e){function d(a,b,d){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|d>>6;c4=d&63;r="";r+=g(c1&63);r+=g(c2&63);r+=g(c3&63);return r+=g(c4&63)}function g(a){if(10>a)return String.fromCharCode(48+
a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var f=new XMLHttpRequest;f.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+d(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+d(a.charCodeAt(i),0,0):r+d(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(f.responseType=
"blob");f.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,g=b.height;if(0==a&&0==g){var f=d.result,m=f.indexOf(","),k=decodeURIComponent(escape(atob(f.substring(m+1)))),l=mxUtils.parseXml(k).getElementsByTagName("svg");0<l.length&&(a=parseFloat(l[0].getAttribute("width")),g=parseFloat(l[0].getAttribute("height")))}c(d.result,a,
g)}catch(F){e(F)}};b.src=d.result};d.onerror=function(a){e(a)}}else e(a)};f.onerror=function(a){e(a)};f.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,e,f,k,l){k=null!=k?k:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&
@@ -9831,24 +9834,24 @@ a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");f.value=a
a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,
14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";
if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var d=new Blob([a],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,
-360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;g.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();else{var g=0,f,m=!1;e.forEach(function(a,
-d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(m=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>g&&(g=e,f=d))});0<g?f.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):m||c()}},
+360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;g.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();else{var g=0,f,k=!1;e.forEach(function(a,
+d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>g&&(g=e,f=d))});0<g?f.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):k||c()}},
function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,f,k,l,q,v,x,y){x=null!=x?x:!0;var d=!1,g=null,m=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,l)):b=this.importXml(a,c,e,x);null!=q&&q(b)});"image"==b.substring(0,5)?(v=!1,"image/png"==b.substring(0,9)&&(b=y?null:
this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,c,e,x),v=!0)),v||(b=this.editor.graph,y=a.indexOf(";"),0<y&&(a=a.substring(0,y)+a.substring(a.indexOf(",",y+1))),x&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),g=[b.insertVertex(null,null,"",c,e,f,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,m)):null!=v&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||
/(\.vs(x|sx?))($|\?)/i.test(l))?(d=!0,this.importVisio(v,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=v?v: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!=q&&q(null))}),l)):0==a.indexOf("PK")&&null!=v?(d=!0,this.importZipFile(v,m,mxUtils.bind(this,function(){g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,x);q(g)}))):/(\.v(sd|dx))($|\?)/i.test(l)||
-/(\.vs(s|x))($|\?)/i.test(l)||(g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,x));d||null==q||q(g);return g};EditorUi.prototype.importFiles=function(a,b,c,e,f,k,l,q,v,x,y,A){e=null!=e?e:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=b&&null!=c,g=!0;b=null!=b?b:0;c=null!=c?c:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=y||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){m=!0;break}var u=mxUtils.bind(this,function(){var m=
-this.editor.graph,n=m.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,e,g,f,m,k,l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,m)),null):this.importFile(a,b,c,e,g,f,m,k,l,d,A)}catch(T){return this.handleError(T),null}});k=null!=k?k:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,z=p,u=[],B=mxUtils.bind(this,function(a,b){u[a]=b;if(0==
---z){this.spinner.stop();if(null!=q)q(u);else{var d=[];m.getModel().beginUpdate();try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),t=0;t<p;t++)mxUtils.bind(this,function(d){var k=a[d];if(null!=k){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,z=p.indexOf(","),u=decodeURIComponent(escape(atob(p.substring(z+1)))),
-t=mxUtils.parseXml(u),u=t.getElementsByTagName("svg");if(0<u.length){var u=u[0],q=A?null:u.getAttribute("content");null!=q&&"<"!=q.charAt(0)&&"%"!=q.charAt(0)&&(q=unescape(window.atob?atob(q):Base64.decode(q,!0)));null!=q&&"%"==q.charAt(0)&&(q=decodeURIComponent(q));null==q||"<mxfile "!==q.substring(0,8)&&"<mxGraphModel "!==q.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(p.substring(0,z+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=g.getAttribute("width"),u=
-g.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,B=g.getAttribute("viewBox");if(null==B||0==B.length)g.setAttribute("viewBox","0 0 "+l+" "+u);else if(isNaN(l)||isNaN(u)){var q=B.split(" ");3<q.length&&(l=parseFloat(q[2]),u=parseFloat(q[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(g));var v=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,u)),x=f(p,k.type,b+d*n,c+d*n,Math.max(1,Math.round(l*v)),Math.max(1,Math.round(u*
-v)),k.name);if(isNaN(l)||isNaN(u)){var C=new Image;C.onload=mxUtils.bind(this,function(){l=Math.max(1,C.width);u=Math.max(1,C.height);x[0].geometry.width=l;x[0].geometry.height=u;g.setAttribute("viewBox","0 0 "+l+" "+u);p=Editor.createSvgDataUri(mxUtils.getXml(g));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));m.setCellStyles("image",p,[x[0]])});C.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return x}}}catch(fa){}return null})):B(d,mxUtils.bind(this,function(){return f(q,
-"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==k.type){var v=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var C=new Image;C.src=a.target.result;B(d,mxUtils.bind(this,function(){return f(v,"text/xml",b+d*n,c+d*n,C.width,C.height,k.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+/(\.vs(s|x))($|\?)/i.test(l)||(g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,x));d||null==q||q(g);return g};EditorUi.prototype.importFiles=function(a,b,c,e,f,k,l,q,v,x,y,A){e=null!=e?e:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=b&&null!=c,g=!0;b=null!=b?b:0;c=null!=c?c:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=y||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){m=!0;break}var t=mxUtils.bind(this,function(){var m=
+this.editor.graph,n=m.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,e,g,f,k,m,l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,e,g,f,k,m,l,d,A)}catch(T){return this.handleError(T),null}});k=null!=k?k:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,z=p,t=[],B=mxUtils.bind(this,function(a,b){t[a]=b;if(0==
+--z){this.spinner.stop();if(null!=q)q(t);else{var d=[];m.getModel().beginUpdate();try{for(var c=0;c<t.length;c++){var e=t[c]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),u=0;u<p;u++)mxUtils.bind(this,function(d){var k=a[d];if(null!=k){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,z=p.indexOf(","),t=decodeURIComponent(escape(atob(p.substring(z+1)))),
+u=mxUtils.parseXml(t),t=u.getElementsByTagName("svg");if(0<t.length){var t=t[0],q=A?null:t.getAttribute("content");null!=q&&"<"!=q.charAt(0)&&"%"!=q.charAt(0)&&(q=unescape(window.atob?atob(q):Base64.decode(q,!0)));null!=q&&"%"==q.charAt(0)&&(q=decodeURIComponent(q));null==q||"<mxfile "!==q.substring(0,8)&&"<mxGraphModel "!==q.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(p.substring(0,z+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=g.getAttribute("width"),t=
+g.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,B=g.getAttribute("viewBox");if(null==B||0==B.length)g.setAttribute("viewBox","0 0 "+l+" "+t);else if(isNaN(l)||isNaN(t)){var q=B.split(" ");3<q.length&&(l=parseFloat(q[2]),t=parseFloat(q[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(g));var v=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,t)),x=f(p,k.type,b+d*n,c+d*n,Math.max(1,Math.round(l*v)),Math.max(1,Math.round(t*
+v)),k.name);if(isNaN(l)||isNaN(t)){var C=new Image;C.onload=mxUtils.bind(this,function(){l=Math.max(1,C.width);t=Math.max(1,C.height);x[0].geometry.width=l;x[0].geometry.height=t;g.setAttribute("viewBox","0 0 "+l+" "+t);p=Editor.createSvgDataUri(mxUtils.getXml(g));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));m.setCellStyles("image",p,[x[0]])});C.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return x}}}catch(fa){}return null})):B(d,mxUtils.bind(this,function(){return f(q,
+"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{t=!1;if("image/png"==k.type){var v=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var C=new Image;C.src=a.target.result;B(d,mxUtils.bind(this,function(){return f(v,"text/xml",b+d*n,c+d*n,C.width,C.height,k.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,a.target.result,mxUtils.bind(this,function(m,l,p){B(d,mxUtils.bind(this,function(){if(null!=m&&m.length<x){var z=g&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(e/l,e/p)):1;return f(m,k.type,b+d*n,c+d*n,Math.round(l*z),Math.round(p*z),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),g,e,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,f(p,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?f(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?p.readAsDataURL(k):p.readAsText(k)}})(t)});if(m){m=[];
-for(p=0;p<a.length;p++)m.push(a[p]);a=m;this.confirmImageResize(function(a){g=a;u()},v)}else 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"),
+return null}))}),g,e,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,f(p,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?f(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?p.readAsDataURL(k):p.readAsText(k)}})(u)});if(m){m=[];
+for(p=0;p<a.length;p++)m.push(a[p]);a=m;this.confirmImageResize(function(a){g=a;t()},v)}else t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(u){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,f,k){f=null!=f?f:this.maxImageSize;var d=Math.max(1,a.width),g=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var m=Math.max(d/f,g/f);if(1<m){var l=Math.round(d/m),n=Math.round(g/m),p=document.createElement("canvas");
-p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var z=p.toDataURL();if(z.length<b.length){var u=document.createElement("canvas");u.width=l;u.height=n;var C=u.toDataURL();z!==C&&(b=z,d=l,g=n)}}}catch(D){}c(b,d,g)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);
+OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(t){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,f,k){f=null!=f?f:this.maxImageSize;var d=Math.max(1,a.width),g=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var m=Math.max(d/f,g/f);if(1<m){var l=Math.round(d/m),n=Math.round(g/m),p=document.createElement("canvas");
+p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var z=p.toDataURL();if(z.length<b.length){var t=document.createElement("canvas");t.width=l;t.height=n;var C=t.toDataURL();z!==C&&(b=z,d=l,g=n)}}}catch(D){}c(b,d,g)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);
d.src=a}catch(p){if(null!=c)c(p);else throw p;}};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph;"dark"==uiTheme&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(b,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("plantUml")+
":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,f.format,function(e,g,k){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(b,"<pre>"+e+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(e),[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=g,m.height=k,c.cellsResized([b],[m],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:d,format:f.format}))}finally{c.getModel().endUpdate()}},
function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};c.cellEditor.editMermaidData=function(b,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,f.config,function(e,g,k){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",e,[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=Math.max(m.width,
@@ -9856,7 +9859,7 @@ g),m.height=Math.max(m.height,k),c.cellsResized([b],[m],!1));c.setAttributeForCe
null!=f)this.editMermaidData(b,d,f);else{var g=c.getCellStyle(b);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(b):e.apply(this,arguments)}}catch(E){a.handleError(E)}};c.getLinkTitle=function(b){return a.getLinkTitle(b)};c.customLinkClicked=function(b){var d=!1;try{a.handleCustomLink(b),d=!0}catch(C){a.handleError(C)}return d};var f=this.clearDefaultStyle;this.clearDefaultStyle=function(){f.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
"https://desk.draw.io/support/solutions/articles/16000051979");var k=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var d=0;d<a.pages.length;d++)if(a.pages[d]==a.currentPage){0<d&&(b+=(0<b.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return k.apply(this,arguments)};var l=c.addClickHandler;c.addClickHandler=function(a,b,d){var e=b;b=function(a,b){if(null==b){var d=mxEvent.getSource(a);
"a"==d.nodeName.toLowerCase()&&(b=d.getAttribute("href"))}null!=b&&c.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&c.customLinkClicked(b)&&mxEvent.consume(a);null!=e&&e(a,b)};l.call(this,a,b,d)};b.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");
-var t=c.getExportVariables;c.getExportVariables=function(){var b=t.apply(this,arguments),d=a.getCurrentFile();null!=d&&(b.filename=d.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var q=c.getGlobalVariable;c.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():
+var u=c.getExportVariables;c.getExportVariables=function(){var b=u.apply(this,arguments),d=a.getCurrentFile();null!=d&&(b.filename=d.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var q=c.getGlobalVariable;c.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():
"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:q.apply(this,arguments)};var v=c.labelLinkClicked;c.labelLinkClicked=function(a,b,d){var e=b.getAttribute("href");if(null==e||!c.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))v.apply(this,arguments);else{if(!c.isEnabled()||null!=a&&c.isCellLocked(a.cell))c.customLinkClicked(e),c.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=
function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.getTitle():b);return b};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,
@@ -9875,83 +9878,83 @@ this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=Math.ma
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(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,d,c,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(v){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
function(){function a(){window.setTimeout(function(){c.innerHTML="&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position=
"absolute";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);
-null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,
-"keyup",mxUtils.bind(this,function(a){var d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(t){this.handleError(t)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
-this.copyCells(c,!0),a()}catch(t){this.handleError(t)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1,!0)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};
-EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");0<d&&(b=this.getPageById(a.substring(d+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
-"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
-this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var d=b.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));
-this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
-function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
-8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=
-null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c,e){if(!mxEvent.isConsumed(a)){var d=b,f=!1;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),d=document.createElement("div");d.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);f=!0;g=d.getElementsByTagName("style");if(null!=g)for(;0<
-g.length;)g[0].parentNode.removeChild(g[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(g=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,g==d.firstChild.nextSibling.getAttribute("href")&&
-(mxUtils.setTextContent(d,g),f=!1));k=k&&null!=d.firstChild?d.firstChild.nextSibling:d.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName&&(g=k.getAttribute("src"),null!=g&&(mxUtils.setTextContent(d,g),f=!1));f&&Graph.removePasteFormatting(d)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,g))}k=d.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===
-k[0].getAttribute("data-lucid-type"))c=k[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,d));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):
-d.innerText);g=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(C){}try{var k=d.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(f);this.isCompatibleString(l)&&(g=!0,f=l)}catch(C){}try{var n=this.editor.graph;if(null!=f&&0<f.length){n.lastPasteXml==f?n.pasteCounter++:(n.lastPasteXml=f,n.pasteCounter=0);var A=n.pasteCounter*n.gridSize;if(g||this.isCompatibleString(f))n.setSelectionCells(this.importXml(f,
-A,A));else if(e&&1==n.getSelectionCount()){var z=n.getStartEditingCell(n.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&"image"==n.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE]?n.setCellStyles(mxConstants.STYLE_IMAGE,f,[z]):(n.labelChanged(z,f),Graph.isLink(f)&&n.setLinkForCell(z,f));n.setSelectionCell(z)}else{var B=n.getInsertPoint();n.isMouseInsertPoint()&&(A=0,n.lastPasteXml==f&&0<n.pasteCounter&&n.pasteCounter--);n.setSelectionCells(this.insertTextAt(f,B.x+A,B.y+A,!0))}n.isSelectionEmpty()||
-(n.scrollCellToVisible(n.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(n.view.getState(n.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else c||(n.lastPasteXml=null,n.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),
-mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
-this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?
-c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=this.editor.graph.sanitizeHtml(d),c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+
-encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=
-function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var f=document.documentElement;c=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=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=d+"px";f.style.width=Math.max(0,c-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 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.openFileHandle=function(a,
-b,c,e,f){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var d=mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(v){this.handleError(v,
-mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,b,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(c,mxUtils.bind(this,function(a){this.spinner.stop();d(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();d(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b))this.parseFile(c,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),
-200<=a.status&&299>=a.status?d(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,e)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();
-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,c.name))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(c,mxUtils.bind(this,function(a){this.spinner.stop();d(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,e)}));else{if("image/png"==c.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==
-c.type){var g=Editor.extractGraphModelFromPdf(a);null!=g&&(a=g)}this.spinner.stop();this.openLocalFile(a,b,e,f,null!=f?c:null)}}};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,a.name,a,b)}catch(t){this.handleError(t)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);
-window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c,e,f){var d=this.getCurrentFile(),g=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,e,f))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?g():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=
-function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=
-function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
-a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
-this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();
-window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
-pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,m=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
-(a=Graph.decompress(a)))}catch(P){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(T){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?
-mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){var n=m(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
-result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));
-try{l.init()}catch(T){k.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,u=1==g.enableSearch,q=1==g.enableCustomTemp,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,message:g}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),
-null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,u?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},
-0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=
-g.modified);return}if("spinner"==g.action){var t=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,t):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var I=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var G=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
-this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=I;k.postMessage(JSON.stringify(b),"*")}),H=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(I)));G!=this.editor.graph&&G.container.parentNode.removeChild(G.container);K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=
-L){for(var O=G.getGlobalVariable,G=this.createTemporaryGraph(G.getStylesheet()),J,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){J=this.updatePageRoot(this.pages[S]);break}G.getGlobalVariable=function(a){return"page"==a?J.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(G.container);G.model.setRoot(J.root)}if(null!=g.layerIds){for(var W=G.model,aa=W.getChildCells(W.getRoot()),l={},S=0;S<g.layerIds.length;S++)l[g.layerIds[S]]=!0;for(S=0;S<aa.length;S++)W.setVisible(aa[S],
-l[aa[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){H(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){H(null)}),null,null,g.scale,null,null,null,G)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(I))).send(mxUtils.bind(this,function(a){200<=
-a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):H(null)}),mxUtils.bind(this,function(){H(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);t=this.createLoadMessage("export");t.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ca=this.getXmlFileData();t.xml=mxUtils.getXml(ca);t.data=this.getFileData(null,null,!0,null,null,null,ca);t.format=g.format}else if("html"==g.format)I=this.editor.getGraphXml(),
-t.data=this.getHtml(I,this.editor.graph),t.xml=mxUtils.getXml(I),t.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);t.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);t.format="svg";var V=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();t.data=Editor.createSvgDataUri(a);k.postMessage(JSON.stringify(t),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,
-null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(t.xml,this.editor.graph,null,!0,V,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var U=this.editor.graph.getSvg(Y);this.embedFonts(U,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){V(mxUtils.getXml(a))})):V(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(t),
-"*")}return}if("load"==g.action)c=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==
-uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var Z=
-this.getCurrentFile();null!=Z&&(n=m(g.xml),null!=n&&""!=n&&Z.mergeFile(new LocalFile(this,n),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),
-"*");return}}catch(T){this.handleError(T)}}var ba=mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ga){this.handleError(ga)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=m();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=m();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));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;k.postMessage(JSON.stringify(l),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(m="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ba(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):null!=g&&"function"===
-typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ba(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ba(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=m(g),
-ba(g,f))}}));var k=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(f,"*");if("json"==urlParams.proto){var l=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,d){l.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,target:b,allowOpener:d}),"*")}}};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":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";var c=b;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),
-b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
-a.appendChild(b),c=b));"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("exit")),b.setAttribute("title",mxResources.get("exit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),c=b);c.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};
-EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=
-function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,l=null,x=null,y=null,A=null,z=null,B=null,C=null,D="",E="auto",F="auto",I=null,G=null,K=40,H=40,L=100,
-O=0,J=this.editor.graph;J.getGraphBounds();for(var S=function(){null!=b?b(ja):(J.setSelectionCells(ja),J.scrollCellToVisible(J.getSelectionCell()))},W=J.getFreeInsertPoint(),aa=W.x,ca=W.y,W=ca,Y=null,V="auto",C=null,U=[],Z=null,ba=null,T=0;T<c.length&&"#"==c[T].charAt(0);){a=c[T];for(T++;T<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[T].substring(1)),T++;if("#"!=a.charAt(1)){var P=a.indexOf(":");if(0<P){var Q=mxUtils.trim(a.substring(1,P)),
-M=mxUtils.trim(a.substring(P+1));"label"==Q?Y=J.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?y=M:"labels"==Q&&0<M.length&&"-"!=M?A=JSON.parse(M):"style"==Q?k=M:"parentstyle"==Q?z=M:"stylename"==Q&&0<M.length&&"-"!=M?x=M:"styles"==Q&&0<M.length&&"-"!=M?l=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?B=M:"parent"==Q&&0<M.length&&"-"!=M?C=M:"namespace"==Q&&0<M.length&&"-"!=M?D=M:"width"==Q?E=M:"height"==Q?F=M:"left"==Q&&0<M.length?I=M:"top"==Q&&0<M.length?G=M:"ignore"==Q?ba=M.split(","):"connect"==
-Q?U.push(JSON.parse(M)):"link"==Q?Z=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?H=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(V=M)}}}if(null==c[T])throw Error(mxResources.get("invalidOrMissingFile"));for(var ga=this.editor.csvToArray(c[T]),Q=P=null,M=[],R=0;R<ga.length;R++)B==ga[R]&&(P=R),C==ga[R]&&(Q=R),M.push(mxUtils.trim(ga[R]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=U)for(var X=
-0;X<U.length;X++)null==g[U[X].to]&&(g[U[X].to]={});B=[];for(R=T+1;R<c.length;R++){var da=this.editor.csvToArray(c[R]);if(null==da){var sa=40<c[R].length?c[R].substring(0,40)+"...":c[R];throw Error(sa+" ("+R+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&B.push(da)}J.model.beginUpdate();try{for(R=0;R<B.length;R++){var da=B[R],N=null,ha=null!=P?D+da[P]:null;null!=ha&&(N=J.model.getCell(ha));var c=null!=N,fa=new mxCell(Y,new mxGeometry(aa,W,0,0),k||"whiteSpace=wrap;html=1;");fa.vertex=
-!0;fa.id=ha;for(var ea=0;ea<da.length;ea++)J.setAttributeForCell(fa,M[ea],da[ea]);if(null!=y&&null!=A){var la=A[fa.getAttribute(y)];null!=la&&J.labelChanged(fa,la)}if(null!=x&&null!=l){var qa=l[fa.getAttribute(x)];null!=qa&&(fa.style=qa)}J.setAttributeForCell(fa,"placeholders","1");fa.style=J.replacePlaceholders(fa,fa.style);c&&(J.model.setGeometry(N,fa.geometry),J.model.setStyle(N,fa.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=fa;if(!c)for(X=0;X<U.length;X++)g[U[X].to][N.getAttribute(U[X].to)]=N;
-null!=Z&&"link"!=Z&&(J.setLinkForCell(N,N.getAttribute(Z)),J.setAttributeForCell(N,Z,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ia=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=I&&null!=N.getAttribute(I)&&(N.geometry.x=aa+parseFloat(N.getAttribute(I))),null!=G&&null!=N.getAttribute(G)&&(N.geometry.y=ca+parseFloat(N.getAttribute(G))),"@"==E.charAt(0)&&null!=N.getAttribute(E.substring(1))?N.geometry.width=parseFloat(N.getAttribute(E.substring(1))):N.geometry.width=
-"auto"==E?ia.width+O:parseFloat(E),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.height=parseFloat(N.getAttribute(F.substring(1))):N.geometry.height="auto"==F?ia.height+O:parseFloat(F),W+=N.geometry.height+H);c?(null==f[ha]&&(f[ha]=[]),f[ha].push(N)):(C=null!=Q?J.model.getCell(D+da[Q]):null,d.push(N),null!=C?(C.style=J.replacePlaceholders(C,z),J.addCell(N,C)):e.push(J.addCell(N)))}for(var ma=e.slice(),ja=e.slice(),X=0;X<U.length;X++)for(var ua=U[X],R=0;R<d.length;R++){var N=d[R],
-va=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(J.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?J.replacePlaceholders(l,c.style):J.createCurrentEdgeStyle(),k=J.insertEdge(null,null,k||"",c.invert?f:
-a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(n)}ja.push(k);mxUtils.remove(c.invert?a:f,ma)}}});va(N,N,ua);if(null!=f[N.id])for(ea=0;ea<f[N.id].length;ea++)va(N,f[N.id][ea],ua)}if(null!=ba)for(R=0;R<d.length;R++)for(N=
-d[R],ea=0;ea<ba.length;ea++)J.setAttributeForCell(N,mxUtils.trim(ba[ea]),null);if(0<e.length){var ka=new mxParallelEdgeLayout(J);ka.spacing=K;var ta=function(){0<ka.spacing&&ka.execute(J.getDefaultParent());for(var a=0;a<e.length;a++){var b=J.getCellGeometry(e[a]);b.x=Math.round(J.snap(b.x));b.y=Math.round(J.snap(b.y));"auto"==E&&(b.width=Math.round(J.snap(b.width)));"auto"==F&&(b.height=Math.round(J.snap(b.height)))}};if("["==V.charAt(0)){var wa=S;J.view.validate();this.executeLayoutList(JSON.parse(V),
-function(){ta();wa()});S=null}else if("circle"==V){var na=new mxCircleLayout(J);na.resetEdges=!1;var xa=na.isVertexIgnored;na.isVertexIgnored=function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){na.execute(J.getDefaultParent());ta()},!0,S);S=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&ja.length==2*e.length-1&&1==ma.length){J.view.validate();var ra=new mxCompactTreeLayout(J,"horizontaltree"==V);ra.levelDistance=H;ra.edgeRouting=!1;ra.resetEdges=
-!1;this.executeLayout(function(){ra.execute(J.getDefaultParent(),0<ma.length?ma[0]:null)},!0,S);S=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==ma.length){J.view.validate();var oa=new mxHierarchicalLayout(J,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=H;oa.parallelEdgeSpacing=K;oa.interRankCellSpacing=L;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(J.getDefaultParent(),ja);J.moveCells(ja,aa,ca)},!0,S);S=null}else if("organic"==
-V||"auto"==V&&ja.length>e.length){J.view.validate();var pa=new mxFastOrganicLayout(J);pa.forceConstant=3*H;pa.resetEdges=!1;var ya=pa.isVertexIgnored;pa.isVertexIgnored=function(a){return ya.apply(this,arguments)||0>mxUtils.indexOf(e,a)};ka=new mxParallelEdgeLayout(J);ka.spacing=K;this.executeLayout(function(){pa.execute(J.getDefaultParent());ta()},!0,S);S=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=S&&S()}}catch(za){this.handleError(za)}};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(" "),
+null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||e||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,
+null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(u){this.handleError(u)}}));mxEvent.addListener(c,
+"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c,!0),a()}catch(u){this.handleError(u)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1,!0)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=
+function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");0<d&&(b=this.getPageById(a.substring(d+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");
+if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,
+function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var d=b.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);
+this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&
+!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(c));mxUtils.setTextContent(a,
+encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c,e){if(!mxEvent.isConsumed(a)){var d=b,f=!1;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),d=document.createElement("div");d.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);
+f=!0;g=d.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(g=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,
+g==d.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(d,g),f=!1));k=k&&null!=d.firstChild?d.firstChild.nextSibling:d.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName&&(g=k.getAttribute("src"),null!=g&&(mxUtils.setTextContent(d,g),f=!1));f&&Graph.removePasteFormatting(d)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,g))}k=d.getElementsByTagName("span");
+if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))c=k[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,d));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));
+else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);g=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(C){}try{var k=d.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(f);this.isCompatibleString(l)&&(g=!0,f=l)}catch(C){}try{var n=this.editor.graph;if(null!=f&&0<f.length){n.lastPasteXml==f?n.pasteCounter++:(n.lastPasteXml=f,n.pasteCounter=0);var A=n.pasteCounter*
+n.gridSize;if(g||this.isCompatibleString(f))n.setSelectionCells(this.importXml(f,A,A));else if(e&&1==n.getSelectionCount()){var z=n.getStartEditingCell(n.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&"image"==n.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE]?n.setCellStyles(mxConstants.STYLE_IMAGE,f,[z]):(n.labelChanged(z,f),Graph.isLink(f)&&n.setLinkForCell(z,f));n.setSelectionCell(z)}else{var B=n.getInsertPoint();n.isMouseInsertPoint()&&(A=0,n.lastPasteXml==f&&0<n.pasteCounter&&
+n.pasteCounter--);n.setSelectionCells(this.insertTextAt(f,B.x+A,B.y+A,!0))}n.isSelectionEmpty()||(n.scrollCellToVisible(n.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(n.view.getState(n.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else c||(n.lastPasteXml=null,n.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",
+function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||
+"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=this.editor.graph.sanitizeHtml(d),c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,
+null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,
+null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var f=document.documentElement;c=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=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=d+"px";f.style.width=Math.max(0,c-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 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.openFileHandle=function(a,b,c,e,f){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var d=mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
+e);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,b,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(c,mxUtils.bind(this,function(a){this.spinner.stop();d(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();d(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,
+b))this.parseFile(c,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?d(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,e)}),mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,c.name))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(c,mxUtils.bind(this,function(a){this.spinner.stop();d(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,e)}));
+else{if("image/png"==c.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==c.type){var g=Editor.extractGraphModelFromPdf(a);null!=g&&(a=g)}this.spinner.stop();this.openLocalFile(a,b,e,f,null!=f?c:null)}}};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,a.name,
+a,b)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c,e,f){var d=this.getCurrentFile(),g=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,e,f))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?g():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=
+null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),
+a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),
+f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=
+a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();
+this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
+function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});
+this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,m=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&
+("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(P){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(T){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
+var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){var n=m(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
+n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(l.container,
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(T){k.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,t=1==g.enableSearch,q=1==g.enableCustomTemp,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
+name:d,message:g}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,t?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),
+null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
+null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var u=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,u):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var I=null!=g.xml?
+g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var H=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=I;k.postMessage(JSON.stringify(b),"*")}),G=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(I)));H!=this.editor.graph&&H.container.parentNode.removeChild(H.container);
+K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=L){for(var O=H.getGlobalVariable,H=this.createTemporaryGraph(H.getStylesheet()),J,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){J=this.updatePageRoot(this.pages[S]);break}H.getGlobalVariable=function(a){return"page"==a?J.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(H.container);H.model.setRoot(J.root)}if(null!=g.layerIds){for(var W=
+H.model,aa=W.getChildCells(W.getRoot()),l={},S=0;S<g.layerIds.length;S++)l[g.layerIds[S]]=!0;for(S=0;S<aa.length;S++)W.setVisible(aa[S],l[aa[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){G(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){G(null)}),null,null,g.scale,null,null,null,H)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(I))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):G(null)}),mxUtils.bind(this,function(){G(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);u=this.createLoadMessage("export");u.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ca=this.getXmlFileData();u.xml=mxUtils.getXml(ca);
+u.data=this.getFileData(null,null,!0,null,null,null,ca);u.format=g.format}else if("html"==g.format)I=this.editor.getGraphXml(),u.data=this.getHtml(I,this.editor.graph),u.xml=mxUtils.getXml(I),u.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);u.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);u.format="svg";var V=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();u.data=Editor.createSvgDataUri(a);
+k.postMessage(JSON.stringify(u),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(u.xml,this.editor.graph,null,!0,V,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var U=this.editor.graph.getSvg(Y);this.embedFonts(U,mxUtils.bind(this,function(a){g.embedImages||
+null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){V(mxUtils.getXml(a))})):V(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(u),"*")}return}if("load"==g.action)c=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&
+(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),
+this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var Z=this.getCurrentFile();null!=Z&&(n=m(g.xml),null!=n&&""!=n&&Z.mergeFile(new LocalFile(this,n),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==
+g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(T){this.handleError(T)}}var ba=mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ga){this.handleError(ga)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=m();c&&null==b&&(b=mxUtils.bind(this,
+function(a,b){var c=m();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));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;k.postMessage(JSON.stringify(l),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(m="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
+1)),function(a){ba(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ba(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,
+mxUtils.bind(this,function(a){ba(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=m(g),ba(g,f))}}));var k=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(f,"*");if("json"==urlParams.proto){var l=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,d){l.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,target:b,allowOpener:d}),"*")}}};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":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";var c=b;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
+a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,
+"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),c=b));"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("exit")),b.setAttribute("title",mxResources.get("exit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),c=b);c.style.marginRight="20px";this.toolbar.container.appendChild(a);
+this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,
+null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,l=null,x=null,y=null,
+A=null,z=null,B=null,C=null,D="",E="auto",F="auto",I=null,H=null,K=40,G=40,L=100,O=0,J=this.editor.graph;J.getGraphBounds();for(var S=function(){null!=b?b(ja):(J.setSelectionCells(ja),J.scrollCellToVisible(J.getSelectionCell()))},W=J.getFreeInsertPoint(),aa=W.x,ca=W.y,W=ca,Y=null,V="auto",C=null,U=[],Z=null,ba=null,T=0;T<c.length&&"#"==c[T].charAt(0);){a=c[T];for(T++;T<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[T].substring(1)),T++;if("#"!=
+a.charAt(1)){var P=a.indexOf(":");if(0<P){var Q=mxUtils.trim(a.substring(1,P)),M=mxUtils.trim(a.substring(P+1));"label"==Q?Y=J.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?y=M:"labels"==Q&&0<M.length&&"-"!=M?A=JSON.parse(M):"style"==Q?k=M:"parentstyle"==Q?z=M:"stylename"==Q&&0<M.length&&"-"!=M?x=M:"styles"==Q&&0<M.length&&"-"!=M?l=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?B=M:"parent"==Q&&0<M.length&&"-"!=M?C=M:"namespace"==Q&&0<M.length&&"-"!=M?D=M:"width"==Q?E=M:"height"==Q?F=M:"left"==
+Q&&0<M.length?I=M:"top"==Q&&0<M.length?H=M:"ignore"==Q?ba=M.split(","):"connect"==Q?U.push(JSON.parse(M)):"link"==Q?Z=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?G=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(V=M)}}}if(null==c[T])throw Error(mxResources.get("invalidOrMissingFile"));for(var ga=this.editor.csvToArray(c[T]),Q=P=null,M=[],R=0;R<ga.length;R++)B==ga[R]&&(P=R),C==ga[R]&&(Q=R),M.push(mxUtils.trim(ga[R]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,
+"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=U)for(var X=0;X<U.length;X++)null==g[U[X].to]&&(g[U[X].to]={});B=[];for(R=T+1;R<c.length;R++){var da=this.editor.csvToArray(c[R]);if(null==da){var sa=40<c[R].length?c[R].substring(0,40)+"...":c[R];throw Error(sa+" ("+R+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&B.push(da)}J.model.beginUpdate();try{for(R=0;R<B.length;R++){var da=B[R],N=null,ha=null!=P?D+da[P]:null;null!=ha&&(N=J.model.getCell(ha));var c=null!=N,fa=new mxCell(Y,
+new mxGeometry(aa,W,0,0),k||"whiteSpace=wrap;html=1;");fa.vertex=!0;fa.id=ha;for(var ea=0;ea<da.length;ea++)J.setAttributeForCell(fa,M[ea],da[ea]);if(null!=y&&null!=A){var la=A[fa.getAttribute(y)];null!=la&&J.labelChanged(fa,la)}if(null!=x&&null!=l){var qa=l[fa.getAttribute(x)];null!=qa&&(fa.style=qa)}J.setAttributeForCell(fa,"placeholders","1");fa.style=J.replacePlaceholders(fa,fa.style);c&&(J.model.setGeometry(N,fa.geometry),J.model.setStyle(N,fa.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=fa;if(!c)for(X=
+0;X<U.length;X++)g[U[X].to][N.getAttribute(U[X].to)]=N;null!=Z&&"link"!=Z&&(J.setLinkForCell(N,N.getAttribute(Z)),J.setAttributeForCell(N,Z,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ia=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=I&&null!=N.getAttribute(I)&&(N.geometry.x=aa+parseFloat(N.getAttribute(I))),null!=H&&null!=N.getAttribute(H)&&(N.geometry.y=ca+parseFloat(N.getAttribute(H))),"@"==E.charAt(0)&&null!=N.getAttribute(E.substring(1))?N.geometry.width=
+parseFloat(N.getAttribute(E.substring(1))):N.geometry.width="auto"==E?ia.width+O:parseFloat(E),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.height=parseFloat(N.getAttribute(F.substring(1))):N.geometry.height="auto"==F?ia.height+O:parseFloat(F),W+=N.geometry.height+G);c?(null==f[ha]&&(f[ha]=[]),f[ha].push(N)):(C=null!=Q?J.model.getCell(D+da[Q]):null,d.push(N),null!=C?(C.style=J.replacePlaceholders(C,z),J.addCell(N,C)):e.push(J.addCell(N)))}for(var ma=e.slice(),ja=e.slice(),X=0;X<
+U.length;X++)for(var ua=U[X],R=0;R<d.length;R++){var N=d[R],va=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(J.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?J.replacePlaceholders(l,c.style):J.createCurrentEdgeStyle(),
+k=J.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(n)}ja.push(k);mxUtils.remove(c.invert?a:f,ma)}}});va(N,N,ua);if(null!=f[N.id])for(ea=0;ea<f[N.id].length;ea++)va(N,f[N.id][ea],
+ua)}if(null!=ba)for(R=0;R<d.length;R++)for(N=d[R],ea=0;ea<ba.length;ea++)J.setAttributeForCell(N,mxUtils.trim(ba[ea]),null);if(0<e.length){var ka=new mxParallelEdgeLayout(J);ka.spacing=K;var ta=function(){0<ka.spacing&&ka.execute(J.getDefaultParent());for(var a=0;a<e.length;a++){var b=J.getCellGeometry(e[a]);b.x=Math.round(J.snap(b.x));b.y=Math.round(J.snap(b.y));"auto"==E&&(b.width=Math.round(J.snap(b.width)));"auto"==F&&(b.height=Math.round(J.snap(b.height)))}};if("["==V.charAt(0)){var wa=S;J.view.validate();
+this.executeLayoutList(JSON.parse(V),function(){ta();wa()});S=null}else if("circle"==V){var na=new mxCircleLayout(J);na.resetEdges=!1;var xa=na.isVertexIgnored;na.isVertexIgnored=function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){na.execute(J.getDefaultParent());ta()},!0,S);S=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&ja.length==2*e.length-1&&1==ma.length){J.view.validate();var ra=new mxCompactTreeLayout(J,"horizontaltree"==V);ra.levelDistance=
+G;ra.edgeRouting=!1;ra.resetEdges=!1;this.executeLayout(function(){ra.execute(J.getDefaultParent(),0<ma.length?ma[0]:null)},!0,S);S=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==ma.length){J.view.validate();var oa=new mxHierarchicalLayout(J,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=G;oa.parallelEdgeSpacing=K;oa.interRankCellSpacing=L;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(J.getDefaultParent(),ja);J.moveCells(ja,
+aa,ca)},!0,S);S=null}else if("organic"==V||"auto"==V&&ja.length>e.length){J.view.validate();var pa=new mxFastOrganicLayout(J);pa.forceConstant=3*G;pa.resetEdges=!1;var ya=pa.isVertexIgnored;pa.isVertexIgnored=function(a){return ya.apply(this,arguments)||0>mxUtils.indexOf(e,a)};ka=new mxParallelEdgeLayout(J);ka.spacing=K;this.executeLayout(function(){pa.execute(J.getDefaultParent());ta()},!0,S);S=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=S&&S()}}catch(za){this.handleError(za)}};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,560,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/
@@ -9978,13 +9981,13 @@ c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackI
this.remoteInvokeCallbacks.push({callback:k,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=
this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(e.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+
d+" is not found.")}catch(x){c(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(t){null!=b&&b(t)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
+isLocalStorage)}catch(u){null!=b&&b(u)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(F){console.log(F)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(F){console.log(F)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(I){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(I){console.log(I)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(p){null!=b&&b(p)}else null!=b&&b()}else a(this.database)};
EditorUi.prototype.setDatabaseItem=function(a,b,c,e,f){this.openDatabase(mxUtils.bind(this,function(d){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=d.transaction(f,"readwrite");g.oncomplete=c;g.onerror=e;for(d=0;d<f.length;d++)g.objectStore(f[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(q){null!=e&&e(q)}}),e)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,
-"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(t){null!=c&&c(t)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],
-"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(t){null!=b&&b(t)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(u){null!=b&&b(u)}}),b)};EditorUi.prototype.commentsSupported=
+"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],
+"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(u){null!=b&&b(u)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(t){null!=b&&b(t)}}),b)};EditorUi.prototype.commentsSupported=
function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();
null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();
return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language",
@@ -9997,45 +10000,45 @@ var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.subs
var CommentsWindow=function(a,e,c,b,k,f){function l(){for(var a=A.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==A&&b++;z.style.display=0==b?"block":"none"}function d(a,b,c,d){function e(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),l()):e();v=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);v=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function g(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function m(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function u(b,c,e,f,k){function B(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});F.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function y(c,e,g,k,l){function z(){m(t);b.addReply(q,function(a){q.id=a;b.replies.push(q);p(t);g&&g()},function(b){B();n(t);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,l)}function B(){d(q,t,function(a){z()},!0)}var v=C().pdiv,q=a.newComment(c,a.getCurrentUser());q.pCommentId=b.id;null==b.replies&&(b.replies=[]);var t=u(q,b.replies,v,f+1);e?B():z()}if(k||!b.isResolved){z.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
-var H=document.createElement("div");H.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;H.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";H.appendChild(E);var G=document.createElement("div");G.className="geCommentUsername";mxUtils.write(G,b.user.displayName||"");E.appendChild(G);G=document.createElement("div");G.className="geCommentDate";G.setAttribute("data-commentId",b.id);g(b,
-G);E.appendChild(G);x.appendChild(H);H=document.createElement("div");H.className="geCommentTxt";mxUtils.write(H,b.content||"");x.appendChild(H);b.isLocked&&(x.style.opacity="0.5");H=document.createElement("div");H.className="geCommentActions";var F=document.createElement("ul");F.className="geCommentActionsList";H.appendChild(F);t||b.isLocked||0!=f&&!q||B(mxResources.get("reply"),function(){y("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||t||b.isLocked||(B(mxResources.get("edit"),
-function(){function c(){d(b,x,function(){m(x);b.editComment(b.content,function(){p(x)},function(b){n(x);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){m(x);b.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var d=x.querySelectorAll(".geCommentAction");for(a=
-0;a<d.length;a++)d[a].parentNode.removeChild(d[a]);p(x);x.style.opacity="0.5"}else{d=C(b).replies;for(a=0;a<d.length;a++)A.removeChild(d[a]);for(a=0;a<c.length;a++)if(c[a]==b){c.splice(a,1);break}z.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(b){n(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));t||b.isLocked||0!=f||B(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
-a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=d);D||(e[g].style.display="none")}l()}b.isResolved?y(mxResources.get("reOpened")+": ",!0,c,!1,
-!0):y(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(H);null!=e?A.insertBefore(x,e.nextSibling):A.appendChild(x);for(e=0;null!=b.replies&&e<b.replies.length;e++)H=b.replies[e],H.isResolved=b.isResolved,u(H,b.replies,null,f+1,k);null!=v&&(v.comment.id==b.id?(k=b.content,b.content=v.comment.content,d(b,x,v.saveCallback,v.deleteOnCancel),b.content=k):null==v.comment.id&&v.comment.pCommentId==b.id&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return x}}var t=
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function m(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function t(b,c,e,f,k){function B(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});F.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=G;a(b);return{pdiv:d,replies:c}}function x(c,e,g,k,l){function z(){m(u);b.addReply(q,function(a){q.id=a;b.replies.push(q);p(u);g&&g()},function(b){B();n(u);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,l)}function B(){d(q,u,function(a){z()},!0)}var v=C().pdiv,q=a.newComment(c,a.getCurrentUser());q.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=t(q,b.replies,v,f+1);e?B():z()}if(k||!b.isResolved){z.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",b.id);G.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(G.style.backgroundColor="ghostWhite");
+var y=document.createElement("div");y.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;y.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";y.appendChild(E);var H=document.createElement("div");H.className="geCommentUsername";mxUtils.write(H,b.user.displayName||"");E.appendChild(H);H=document.createElement("div");H.className="geCommentDate";H.setAttribute("data-commentId",b.id);g(b,
+H);E.appendChild(H);G.appendChild(y);y=document.createElement("div");y.className="geCommentTxt";mxUtils.write(y,b.content||"");G.appendChild(y);b.isLocked&&(G.style.opacity="0.5");y=document.createElement("div");y.className="geCommentActions";var F=document.createElement("ul");F.className="geCommentActionsList";y.appendChild(F);u||b.isLocked||0!=f&&!q||B(mxResources.get("reply"),function(){x("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||u||b.isLocked||(B(mxResources.get("edit"),
+function(){function c(){d(b,G,function(){m(G);b.editComment(b.content,function(){p(G)},function(b){n(G);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){m(G);b.deleteComment(function(a){if(!0===a){a=G.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var d=G.querySelectorAll(".geCommentAction");for(a=
+0;a<d.length;a++)d[a].parentNode.removeChild(d[a]);p(G);G.style.opacity="0.5"}else{d=C(b).replies;for(a=0;a<d.length;a++)A.removeChild(d[a]);for(a=0;a<c.length;a++)if(c[a]==b){c.splice(a,1);break}z.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(b){n(G);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=f||B(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
+a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=d);D||(e[g].style.display="none")}l()}b.isResolved?x(mxResources.get("reOpened")+": ",!0,c,!1,
+!0):x(mxResources.get("markedAsResolved"),!1,c,!0)});G.appendChild(y);null!=e?A.insertBefore(G,e.nextSibling):A.appendChild(G);for(e=0;null!=b.replies&&e<b.replies.length;e++)y=b.replies[e],y.isResolved=b.isResolved,t(y,b.replies,null,f+1,k);null!=v&&(v.comment.id==b.id?(k=b.content,b.content=v.comment.content,d(b,G,v.saveCallback,v.deleteOnCancel),b.content=k):null==v.comment.id&&v.comment.pCommentId==b.id&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return G}}var u=
!a.canComment(),q=a.canReplyToReplies(),v=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;A.style.bottom=parseInt(y)+7+"px";x.appendChild(A);var z=document.createElement("span");z.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(z,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=y;B.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(B.style.filter="none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!t){var C=y.cloneNode();C.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
-C.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(C,"click",function(b){function c(){d(e,f,function(b){m(f);a.addComment(b,function(a){b.id=a;E.push(b);p(f)},function(b){n(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=u(e,E,null,0);c();b.preventDefault();mxEvent.consume(b)});B.appendChild(C)}C=y.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
+mxUtils.write(z,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=y;B.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(B.style.filter="none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!u){var C=y.cloneNode();C.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
+C.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(C,"click",function(b){function c(){d(e,f,function(b){m(f);a.addComment(b,function(a){b.id=a;E.push(b);p(f)},function(b){n(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=t(e,E,null,0);c();b.preventDefault();mxEvent.consume(b)});B.appendChild(C)}C=y.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
C.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(C.style.filter="invert(100%)");mxEvent.addListener(C,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";F();a.preventDefault();mxEvent.consume(a)});B.appendChild(C);a.commentsRefreshNeeded()&&(C=y.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',C.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(C.style.filter="invert(100%)"),
mxEvent.addListener(C,"click",function(a){F();a.preventDefault();mxEvent.consume(a)}),B.appendChild(C));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),B.appendChild(y));x.appendChild(B);var E=[],F=mxUtils.bind(this,function(){this.hasError=
-!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(H){a.handleError(H)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=
-a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});A.innerHTML="";A.appendChild(z);z.style.display="block";E=a;for(a=0;a<E.length;a++)b(E[a].replies),u(E[a],E,null,0,D);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
+!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(G){a.handleError(G)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=
+a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});A.innerHTML="";A.appendChild(z);z.style.display="block";E=a;for(a=0;a<E.length;a++)b(E[a].replies),t(E[a],E,null,0,D);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
(a&&a.message?": "+a.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});F();this.refreshComments=F;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(g(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=A.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<E.length;d++)a(E[d])}});setInterval(B,6E4);this.refreshCommentsTime=
B;this.window=new mxWindow(mxResources.get("comments"),x,e,c,b,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var I=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",I);this.destroy=function(){mxEvent.removeListener(window,"resize",I);this.window.destroy()}},ConfirmDialog=
-function(a,e,c,b,k,f,l,d,g,m,n){var p=document.createElement("div");p.style.textAlign="center";n=null!=n?n:44;var u=document.createElement("div");u.style.padding="6px";u.style.overflow="auto";u.style.maxHeight=n+"px";u.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(u.style.height="60px");mxUtils.write(u,e);p.appendChild(u);null!=m&&(u=document.createElement("div"),u.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",m),u.appendChild(e),p.appendChild(u));m=document.createElement("div");
-m.style.textAlign="center";m.style.whiteSpace="nowrap";var t=document.createElement("input");t.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(t.checked)});f.className="geBtn";null!=d&&(f.innerHTML=d+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&m.appendChild(f);var q=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=c&&
-c(t.checked)});m.appendChild(q);null!=l?(q.innerHTML=l+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||m.appendChild(f);p.appendChild(m);g?(m.style.marginTop="10px",u=document.createElement("p"),u.style.marginTop="20px",u.appendChild(t),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),u.appendChild(k),p.appendChild(u),
-mxEvent.addListener(k,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)})):m.style.marginTop="12px";this.init=function(){q.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
+function(a,e,c,b,k,f,l,d,g,m,n){var p=document.createElement("div");p.style.textAlign="center";n=null!=n?n:44;var t=document.createElement("div");t.style.padding="6px";t.style.overflow="auto";t.style.maxHeight=n+"px";t.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(t.style.height="60px");mxUtils.write(t,e);p.appendChild(t);null!=m&&(t=document.createElement("div"),t.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",m),t.appendChild(e),p.appendChild(t));m=document.createElement("div");
+m.style.textAlign="center";m.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});f.className="geBtn";null!=d&&(f.innerHTML=d+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&m.appendChild(f);var q=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=c&&
+c(u.checked)});m.appendChild(q);null!=l?(q.innerHTML=l+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||m.appendChild(f);p.appendChild(m);g?(m.style.marginTop="10px",t=document.createElement("p"),t.style.marginTop="20px",t.appendChild(u),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),t.appendChild(k),p.appendChild(t),
+mxEvent.addListener(k,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):m.style.marginTop="12px";this.init=function(){q.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
EditorUi.prototype.patchPages=function(a,e,c,b,k){var f={},l=[],d={},g={},m={},n={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var p in b[EditorUi.DIFF_UPDATE])f[p]=b[EditorUi.DIFF_UPDATE][p];if(null!=e[EditorUi.DIFF_REMOVE])for(b=0;b<e[EditorUi.DIFF_REMOVE].length;b++)g[e[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(b=0;b<e[EditorUi.DIFF_INSERT].length;b++)d[e[EditorUi.DIFF_INSERT][b].previous]=e[EditorUi.DIFF_INSERT][b];if(null!=e[EditorUi.DIFF_UPDATE])for(p in e[EditorUi.DIFF_UPDATE])b=
-e[EditorUi.DIFF_UPDATE][p],null!=b.previous&&(n[b.previous]=p);if(null!=a){var u="";for(b=0;b<a.length;b++){var t=a[b].getId();m[t]=a[b];null!=n[u]||g[t]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][t]&&null!=e[EditorUi.DIFF_UPDATE][t].previous||(n[u]=t);u=t}}var q={},v=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!q[b]){q[b]=!0;l.push(a);var g=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][b]:null;null!=g&&(this.updatePageRoot(a),null!=g.name&&a.setName(g.name),
+e[EditorUi.DIFF_UPDATE][p],null!=b.previous&&(n[b.previous]=p);if(null!=a){var t="";for(b=0;b<a.length;b++){var u=a[b].getId();m[u]=a[b];null!=n[t]||g[u]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][u]&&null!=e[EditorUi.DIFF_UPDATE][u].previous||(n[t]=u);t=u}}var q={},v=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!q[b]){q[b]=!0;l.push(a);var g=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][b]:null;null!=g&&(this.updatePageRoot(a),null!=g.name&&a.setName(g.name),
null!=g.view&&this.patchViewState(a,g.view),null!=g.cells&&this.patchPage(a,g.cells,f[a.getId()],k),!c||null==g.cells&&null==g.view||(a.needsUpdate=!0))}a=n[b];null!=a&&(delete n[b],v(m[a]));a=d[b];null!=a&&(delete d[b],x(a))}),x=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=m[a.getId()];null==b?v(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});v();for(p in n)v(m[n[p]]),
delete n[p];for(p in d)x(d[p]),delete d[p];return l};EditorUi.prototype.patchViewState=function(a,e){if(null!=a.viewState&&null!=e){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var c in e)a.viewState[c]=JSON.parse(e[c]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
EditorUi.prototype.createParentLookup=function(a,e){function c(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=e[EditorUi.DIFF_INSERT])for(var k=0;k<e[EditorUi.DIFF_INSERT].length;k++){var f=e[EditorUi.DIFF_INSERT][k],l=null!=f.parent?f.parent:"",d=null!=f.previous?f.previous:"";c(l).inserted[d]=f}if(null!=e[EditorUi.DIFF_UPDATE])for(var g in e[EditorUi.DIFF_UPDATE])f=e[EditorUi.DIFF_UPDATE][g],null!=f.previous&&(l=f.parent,null==l&&(k=a.getCell(g),null!=k&&(k=
a.getParent(k),null!=k&&(l=k.getId()))),null!=l&&(c(l).moved[f.previous]=g));return b};
-EditorUi.prototype.patchPage=function(a,e,c,b){var k=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(k,e);k.beginUpdate();try{var l=k.updateEdgeParent,d=new mxDictionary,g=[];k.updateEdgeParent=function(a,c){!d.get(a)&&b&&(d.put(a,!0),g.push(a))};var m=f[""],n=null!=m&&null!=m.inserted?m.inserted[""]:null,p=null;null!=n&&(p=this.getCellForJson(n));if(null==p){var u=null!=m&&null!=m.moved?m.moved[""]:null;null!=u&&(p=k.getCell(u))}null!=p&&(k.setRoot(p),
-a.root=p);this.patchCellRecursive(a,k,k.root,f,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var t=0;t<e[EditorUi.DIFF_REMOVE].length;t++){var q=k.getCell(e[EditorUi.DIFF_REMOVE][t]);null!=q&&k.remove(q)}if(null!=e[EditorUi.DIFF_UPDATE]){var v=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(u in e[EditorUi.DIFF_UPDATE])this.patchCell(k,k.getCell(u),e[EditorUi.DIFF_UPDATE][u],null!=v?v[u]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(t=0;t<e[EditorUi.DIFF_INSERT].length;t++)n=e[EditorUi.DIFF_INSERT][t],
-q=k.getCell(n.id),null!=q&&(k.setTerminal(q,k.getCell(n.source),!0),k.setTerminal(q,k.getCell(n.target),!1));k.updateEdgeParent=l;if(b&&0<g.length)for(t=0;t<g.length;t++)k.contains(g[t])&&k.updateEdgeParent(g[t])}finally{k.endUpdate()}};
+EditorUi.prototype.patchPage=function(a,e,c,b){var k=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(k,e);k.beginUpdate();try{var l=k.updateEdgeParent,d=new mxDictionary,g=[];k.updateEdgeParent=function(a,c){!d.get(a)&&b&&(d.put(a,!0),g.push(a))};var m=f[""],n=null!=m&&null!=m.inserted?m.inserted[""]:null,p=null;null!=n&&(p=this.getCellForJson(n));if(null==p){var t=null!=m&&null!=m.moved?m.moved[""]:null;null!=t&&(p=k.getCell(t))}null!=p&&(k.setRoot(p),
+a.root=p);this.patchCellRecursive(a,k,k.root,f,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var u=0;u<e[EditorUi.DIFF_REMOVE].length;u++){var q=k.getCell(e[EditorUi.DIFF_REMOVE][u]);null!=q&&k.remove(q)}if(null!=e[EditorUi.DIFF_UPDATE]){var v=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(t in e[EditorUi.DIFF_UPDATE])this.patchCell(k,k.getCell(t),e[EditorUi.DIFF_UPDATE][t],null!=v?v[t]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(u=0;u<e[EditorUi.DIFF_INSERT].length;u++)n=e[EditorUi.DIFF_INSERT][u],
+q=k.getCell(n.id),null!=q&&(k.setTerminal(q,k.getCell(n.source),!0),k.setTerminal(q,k.getCell(n.target),!1));k.updateEdgeParent=l;if(b&&0<g.length)for(u=0;u<g.length;u++)k.contains(g[u])&&k.updateEdgeParent(g[u])}finally{k.endUpdate()}};
EditorUi.prototype.patchCellRecursive=function(a,e,c,b,k){if(null!=c){for(var f=b[c.getId()],l=null!=f&&null!=f.inserted?f.inserted:{},f=null!=f&&null!=f.moved?f.moved:{},d=0,g=e.getChildCount(c),m="",n=0;n<g;n++){var p=e.getChildAt(c,n).getId();null==f[m]&&(null==k[EditorUi.DIFF_UPDATE]||null==k[EditorUi.DIFF_UPDATE][p]||null==k[EditorUi.DIFF_UPDATE][p].previous&&null==k[EditorUi.DIFF_UPDATE][p].parent)&&(f[m]=p);m=p}g=mxUtils.bind(this,function(f,g){var l=null!=f?f.getId():"";if(null!=f&&g){var m=
e.getCell(l);null!=m&&m!=f&&(f=null)}null!=f&&(e.getChildAt(c,d)!=f&&e.add(c,f,d),this.patchCellRecursive(a,e,f,b,k),d++);return l});for(m=[null];0<m.length;)if(n=m.shift(),n=g(null!=n?n.child:null,null!=n?n.insert:!1),p=f[n],null!=p&&(delete f[n],m.push({child:e.getCell(p)})),p=l[n],null!=p&&(delete l[n],m.push({child:this.getCellForJson(p),insert:!0})),0==m.length){for(n in f)m.push({child:e.getCell(f[n])}),delete f[n];for(n in l)m.push({child:this.getCellForJson(l[n]),insert:!0}),delete l[n]}}};
EditorUi.prototype.patchCell=function(a,e,c,b){if(null!=e&&null!=c){if(null==b||null==b.xmlValue&&(null==b.value||""==b.value))"value"in c?a.setValue(e,c.value):null!=c.xmlValue&&a.setValue(e,mxUtils.parseXml(c.xmlValue).documentElement);null!=b&&null!=b.style||null==c.style||a.setStyle(e,c.style);null!=c.visible&&a.setVisible(e,1==c.visible);null!=c.collapsed&&a.setCollapsed(e,1==c.collapsed);null!=c.vertex&&(e.vertex=1==c.vertex);null!=c.edge&&(e.edge=1==c.edge);null!=c.connectable&&(e.connectable=
1==c.connectable);null!=c.geometry&&a.setGeometry(e,this.codec.decode(mxUtils.parseXml(c.geometry).documentElement));null!=c.source&&a.setTerminal(e,a.getCell(c.source),!0);null!=c.target&&a.setTerminal(e,a.getCell(c.target),!1);for(var k in c)this.cellProperties[k]||(e[k]=c[k])}};
EditorUi.prototype.getPagesForNode=function(a,e){var c=this.editor.extractGraphModel(a,!0,!0);null!=c&&(a=c);var c=a.getElementsByTagName(e||"diagram"),b=[];if(0<c.length)for(var k=0;k<c.length;k++){var f=new DiagramPage(c[k]);this.updatePageRoot(f,!0);b.push(f)}else"mxGraphModel"==a.nodeName&&(f=new DiagramPage(a.ownerDocument.createElement("diagram")),f.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(f.node,Graph.compressNode(a,!0)),b.push(f));return b};
-EditorUi.prototype.diffPages=function(a,e){for(var c=[],b=[],k={},f={},l={},d=null,g=0;g<e.length;g++)f[e[g].getId()]={page:e[g],prev:d},d=e[g];d=null;for(g=0;g<a.length;g++){var m=a[g].getId(),n=f[m];if(null==n)b.push(m);else{var p=this.diffPage(a[g],n.page),u={};0<Object.keys(p).length&&(u.cells=p);p=this.diffViewState(a[g],n.page);0<Object.keys(p).length&&(u.view=p);if((null!=n.prev?null==d:null!=d)||null!=d&&null!=n.prev&&d.getId()!=n.prev.getId())u.previous=null!=n.prev?n.prev.getId():"";null!=
-n.page.getName()&&a[g].getName()!=n.page.getName()&&(u.name=n.page.getName());0<Object.keys(u).length&&(l[m]=u)}delete f[a[g].getId()];d=a[g]}for(m in f)n=f[m],c.push({data:mxUtils.getXml(n.page.node),previous:null!=n.prev?n.prev.getId():""});0<Object.keys(l).length&&(k[EditorUi.DIFF_UPDATE]=l);0<b.length&&(k[EditorUi.DIFF_REMOVE]=b);0<c.length&&(k[EditorUi.DIFF_INSERT]=c);return k};
+EditorUi.prototype.diffPages=function(a,e){for(var c=[],b=[],k={},f={},l={},d=null,g=0;g<e.length;g++)f[e[g].getId()]={page:e[g],prev:d},d=e[g];d=null;for(g=0;g<a.length;g++){var m=a[g].getId(),n=f[m];if(null==n)b.push(m);else{var p=this.diffPage(a[g],n.page),t={};0<Object.keys(p).length&&(t.cells=p);p=this.diffViewState(a[g],n.page);0<Object.keys(p).length&&(t.view=p);if((null!=n.prev?null==d:null!=d)||null!=d&&null!=n.prev&&d.getId()!=n.prev.getId())t.previous=null!=n.prev?n.prev.getId():"";null!=
+n.page.getName()&&a[g].getName()!=n.page.getName()&&(t.name=n.page.getName());0<Object.keys(t).length&&(l[m]=t)}delete f[a[g].getId()];d=a[g]}for(m in f)n=f[m],c.push({data:mxUtils.getXml(n.page.node),previous:null!=n.prev?n.prev.getId():""});0<Object.keys(l).length&&(k[EditorUi.DIFF_UPDATE]=l);0<b.length&&(k[EditorUi.DIFF_REMOVE]=b);0<c.length&&(k[EditorUi.DIFF_INSERT]=c);return k};
EditorUi.prototype.createCellLookup=function(a,e,c){c=null!=c?c:{};c[a.getId()]={cell:a,prev:e};var b=a.getChildCount();e=null;for(var k=0;k<b;k++){var f=a.getChildAt(k);this.createCellLookup(f,e,c);e=f}return c};
EditorUi.prototype.diffCellRecursive=function(a,e,c,b,k){b=null!=b?b:{};var f=c[a.getId()];delete c[a.getId()];if(null==f)k.push(a.getId());else{var l=this.diffCell(a,f.cell);if(null!=l.parent||(null!=f.prev?null==e:null!=e)||null!=e&&null!=f.prev&&e.getId()!=f.prev.getId())l.previous=null!=f.prev?f.prev.getId():"";0<Object.keys(l).length&&(b[a.getId()]=l)}f=a.getChildCount();e=null;for(l=0;l<f;l++){var d=a.getChildAt(l);this.diffCellRecursive(d,e,c,b,k);e=d}return b};
EditorUi.prototype.diffPage=function(a,e){var c=[],b=[],k={};this.updatePageRoot(a);this.updatePageRoot(e);var f=this.createCellLookup(e.root),l=this.diffCellRecursive(a.root,null,f,l,b),d;for(d in f){var g=f[d];c.push(this.getJsonForCell(g.cell,g.prev))}0<Object.keys(l).length&&(k[EditorUi.DIFF_UPDATE]=l);0<b.length&&(k[EditorUi.DIFF_REMOVE]=b);0<c.length&&(k[EditorUi.DIFF_INSERT]=c);return k};
@@ -10081,20 +10084,20 @@ DrawioFileSync.prototype.fileChanged=function(a,e,c,b){return this.notifyThread=
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorRevisionId(a,this.file.getCurrentRevisionId()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};
DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(a,e,c,b){if(null!=a&&(null==b||!b())){var k=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==k)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=e&&e();else if(this.isValidState()){var l=this.file.getDescriptorSecret(a);if(null==l)this.reload(e,c,b);else{var d=0,g=!1,m=mxUtils.bind(this,function(){if(null==b||!b())if(f!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var n=!0,p=window.setTimeout(mxUtils.bind(this,
-function(){n=!1;this.reload(e,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(k)+(null!=l?"&secret="+encodeURIComponent(l):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(p);if(n&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var l=null,q=[];if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var v=
-JSON.parse(k.getText());if(null!=v&&0<v.length)for(var u=0;u<v.length;u++){var y=this.stringToObject(v[u]);if(y.v>DrawioFileSync.PROTOCOL){g=!0;q=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)l=y.d.checksum,q.push(y.d.patch);else{g=!0;q=[];break}}}catch(A){q=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,l,a,e,c,b)):d<=this.maxCacheReadyRetries-1&&!g&&401!=k.getStatus()&&503!=k.getStatus()?(d++,this.file.stats.cacheMiss++,
+function(){n=!1;this.reload(e,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(k)+(null!=l?"&secret="+encodeURIComponent(l):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(p);if(n&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var l=null,t=[];if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var v=
+JSON.parse(k.getText());if(null!=v&&0<v.length)for(var x=0;x<v.length;x++){var y=this.stringToObject(v[x]);if(y.v>DrawioFileSync.PROTOCOL){g=!0;t=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)l=y.d.checksum,t.push(y.d.patch);else{g=!0;t=[];break}}}catch(A){t=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,l,a,e,c,b)):d<=this.maxCacheReadyRetries-1&&!g&&401!=k.getStatus()&&503!=k.getStatus()?(d++,this.file.stats.cacheMiss++,
window.setTimeout(m,(d+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(e,c,b))}catch(A){null!=c&&c(A)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(m,this.cacheReadyDelay)}}else null!=c&&c()}};DrawioFileSync.prototype.reload=function(a,e,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=e&&e(a)}),c,b)};
DrawioFileSync.prototype.merge=function(a,e,c,b,k,f){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var l=this.file.ignorePatches(a),d=this.file.getDescriptorRevisionId(c);if(!l){for(f=0;f<a.length;f++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
a[f]);var g=null!=e?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",d,"etag",this.file.getDescriptorEtag(c),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",e==g,e);if(null!=e&&e!=g){var m=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(d);this.file.checksumError(k,a,"From: "+m+"\nTo: "+n+"\nChecksum: "+e+"\nCurrent: "+g,d,"merge");
-return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(t){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=k&&k(t);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(d),this.file.sendErrorReport("Error in merge",
-"From: "+m+"\nTo: "+n+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),t);else{var p=this.file.getCurrentUser(),u=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),u,t)}}catch(q){}}};
+return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=k&&k(u);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(d),this.file.sendErrorReport("Error in merge",
+"From: "+m+"\nTo: "+n+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u);else{var p=this.file.getCurrentUser(),t=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),t,u)}}catch(q){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),c=this.file.getCurrentRevisionId(),b=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(c)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(b));this.file.stats.bytesSent+=b.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=Graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(a))};
DrawioFileSync.prototype.createToken=function(a,e,c){var b=!0,k=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(a),mxUtils.bind(this,function(a){window.clearTimeout(k);b&&(200<=a.getStatus()&&299>=a.getStatus()?e(a.getText()):c({code:a.getStatus(),message:"Token Error "+a.getStatus()}))}))};
DrawioFileSync.prototype.fileSaved=function(a,e,c,b,k){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var f=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),l=this.file.getDescriptorSecret(this.file.getDescriptor()),d=this.file.getDescriptorRevisionId(e),g=this.file.getCurrentRevisionId();if(null==
l)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(f),function(){}),null!=c&&c(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",d,"to",g,"etag",this.file.getCurrentEtag(),"notify");else{var m=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);e=this.file.getDescriptorSecret(e);var n=this.ui.getHashValueForPages(a),m=this.ui.diffPages(m,a),p=this.objectToString(this.createMessage({patch:m,
-checksum:n}));this.file.stats.bytesSent+=p.length;this.file.stats.msgSent++;var u=!0,t=window.setTimeout(mxUtils.bind(this,function(){u=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(d)+"&to="+encodeURIComponent(g)+"&msg="+encodeURIComponent(f)+(null!=l?"&secret="+encodeURIComponent(l):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(p.length<this.maxCacheEntrySize?"&data="+
-encodeURIComponent(p):"")+(null!=k?"&token="+encodeURIComponent(k):""),mxUtils.bind(this,function(a){window.clearTimeout(t);u&&(200<=a.getStatus()&&299>=a.getStatus()?null!=c&&c():b({code:a.getStatus(),message:a.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",d,"to",g,"etag",this.file.getCurrentEtag(),p.length,"bytes","diff",m,"checksum",n)}}this.file.shadowPages=a};
+checksum:n}));this.file.stats.bytesSent+=p.length;this.file.stats.msgSent++;var t=!0,u=window.setTimeout(mxUtils.bind(this,function(){t=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(d)+"&to="+encodeURIComponent(g)+"&msg="+encodeURIComponent(f)+(null!=l?"&secret="+encodeURIComponent(l):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(p.length<this.maxCacheEntrySize?"&data="+
+encodeURIComponent(p):"")+(null!=k?"&token="+encodeURIComponent(k):""),mxUtils.bind(this,function(a){window.clearTimeout(u);t&&(200<=a.getStatus()&&299>=a.getStatus()?null!=c&&c():b({code:a.getStatus(),message:a.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",d,"to",g,"etag",this.file.getCurrentEtag(),p.length,"bytes","diff",m,"checksum",n)}}this.file.shadowPages=a};
DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(a+="&sid="+this.pusher.connection.socket_id);return a};DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(a,e,c){this.catchupRetryCount++;this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=a?this.catchup(a,e,c):this.fileChanged(e,c)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=c&&c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
@@ -10106,7 +10109,7 @@ mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.wai
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,e,c,b){};mxAsyncCanvas.prototype.roundrect=function(a,e,c,b,k,f){};mxAsyncCanvas.prototype.ellipse=function(a,e,c,b){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
mxAsyncCanvas.prototype.image=function(a,e,c,b,k,f,l,d){k=this.rewriteImageSource(k);a=this.htmlCanvas.images[k];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[k]=a,a.src=k)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,e,c,b,k,f,l,d,g,m,n,p){if(null!=k&&0!=k.length&&(a=this.state.scale,"html"==g&&"function"===typeof html2canvas)){this.incWaitCounter();var u=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[u]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.text=function(a,e,c,b,k,f,l,d,g,m,n,p){if(null!=k&&0!=k.length&&(a=this.state.scale,"html"==g&&"function"===typeof html2canvas)){this.incWaitCounter();var t=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[t]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,b,k){return c+c+b+b+k+k});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,e){this.state.dx+=a;this.state.dy+=e;this.ctx.translate(a,e)};
@@ -10136,8 +10139,8 @@ DriveFile.prototype.isConflict=function(a){return null!=a&&null!=a.error&&412==a
DriveFile.prototype.getPublicUrl=function(a){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(e){if(null!=e&&null!=e.items)for(var c=0;c<e.items.length;c++)if("anyoneWithLink"===e.items[c].id||"anyone"===e.items[c].id){a(this.desc.webContentLink);return}a(null)}),mxUtils.bind(this,function(){a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(a,e,c,b,k){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,e,c,b,k)}),c,b,k])};
DriveFile.prototype.saveFile=function(a,e,c,b,k,f){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(a,d){var g=mxUtils.bind(this,function(f,l){try{var m=this.desc;this.ui.drive.saveFile(this,l,mxUtils.bind(this,function(a,f){try{this.savingFile=!1,0!=a?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.min(8E3,Math.max(this.saveDelay+
-500,DriveFile.prototype.autosaveDelay)),this.desc=a,null!=d?this.fileSaved(f,m,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c(a)}),b,d):c(a)):null!=b&&b(a)}catch(q){if(this.savingFile=!1,null!=b)b(q);else throw q;}}),mxUtils.bind(this,function(a,c){try{this.savingFile=!1,this.isConflict(a)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();this.setShadowModified(!1);
-g(f,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(a)}catch(q){if(this.savingFile=!1,null!=b)b(q);else throw q;}}),k,k,f,null,a)}catch(u){if(this.savingFile=!1,null!=b)b(u);else throw u;}});g(f,e)}))):null!=c&&c()}catch(l){if(null!=b)b(l);else throw l;}};
+500,DriveFile.prototype.autosaveDelay)),this.desc=a,null!=d?this.fileSaved(f,m,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c(a)}),b,d):null!=c&&c(a)):null!=b&&b(a)}catch(q){if(this.savingFile=!1,null!=b)b(q);else throw q;}}),mxUtils.bind(this,function(a,c){try{this.savingFile=!1,this.isConflict(a)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();this.setShadowModified(!1);
+g(f,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(a)}catch(q){if(this.savingFile=!1,null!=b)b(q);else throw q;}}),k,k,f,null,a)}catch(t){if(this.savingFile=!1,null!=b)b(t);else throw t;}});g(f,e)}))):null!=c&&c()}catch(l){if(null!=b)b(l);else throw l;}};
DriveFile.prototype.copyFile=function(a,e){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,e)}catch(c){e(c)}}),e,!0)};
DriveFile.prototype.makeCopy=function(a,e,c){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,c),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(a,e,c){this.ui.drive.copyFile(this.getId(),a,e,c)};
DriveFile.prototype.rename=function(a,e,c){var b=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(k){this.hasSameExtension(a,this.getTitle())?(this.desc=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=e&&e(k)):(this.desc=k,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,e,c))}),c)};
@@ -10180,23 +10183,23 @@ DriveClient.prototype.getLibrary=function(a,e,c){return this.getFile(a,e,c,!0,!0
DriveClient.prototype.getFile=function(a,e,c,b,k){b=null!=b?b:!1;k=null!=k?k:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+a+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=a;this.getXmlFile(b,e,c)}),c):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var f=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
f?this.ui.convertFile(a.downloadUrl,a.title,a.mimeType,this.extension,e,c,null,{Authorization:"Bearer "+this.token}):b||k||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,e,c,!0,k):this.getXmlFile(a,e,c)}else c({message:mxResources.get("loggedOut")})}catch(d){if(null!=c)c(d);else throw d;}}),c)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
DriveClient.prototype.getXmlFile=function(a,e,c,b,k){try{var f={Authorization:"Bearer "+this.token},l=a.downloadUrl;this.ui.editor.loadUrl(l,mxUtils.bind(this,function(b){try{if(null==b)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||k)a.mimeType!=this.libraryMimeType||k?e(new DriveLibrary(this.ui,b,a)):c({message:mxResources.get("notADiagramFile")});else{var d=!1;if(/\.png$/i.test(a.title)){var f=b.lastIndexOf(",");if(0<f){var n=this.ui.extractGraphModelFromPng(b.substring(f+
-1));if(null!=n&&0<n.length)b=n;else try{var n=b.substring(f+1),p=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n),u=this.ui.editor.extractGraphModel(mxUtils.parseXml(p).documentElement,!0);null==u||0<u.getElementsByTagName("parsererror").length?d=!0:b=p}catch(t){d=!0}}}else/\.pdf$/i.test(a.title)?(n=Editor.extractGraphModelFromPdf(b),null!=n&&0<n.length&&(d=!0,b=n)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(p=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(p):
-Base64.decode(p));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,l)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?e(new LocalFile(this.ui,b.responseText,a.title+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(q){if(null!=c)c(q);else throw q;}}),a.title):e(d?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(t){if(null!=
-c)c(t);else throw t;}}),c,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title)||/\.pdf$/i.test(a.title),null,null,null,f)}catch(d){if(null!=c)c(d);else throw d;}};
+1));if(null!=n&&0<n.length)b=n;else try{var n=b.substring(f+1),p=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n),t=this.ui.editor.extractGraphModel(mxUtils.parseXml(p).documentElement,!0);null==t||0<t.getElementsByTagName("parsererror").length?d=!0:b=p}catch(u){d=!0}}}else/\.pdf$/i.test(a.title)?(n=Editor.extractGraphModelFromPdf(b),null!=n&&0<n.length&&(d=!0,b=n)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(p=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(p):
+Base64.decode(p));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,l)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?e(new LocalFile(this.ui,b.responseText,a.title+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(q){if(null!=c)c(q);else throw q;}}),a.title):e(d?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(u){if(null!=
+c)c(u);else throw u;}}),c,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title)||/\.pdf$/i.test(a.title),null,null,null,f)}catch(d){if(null!=c)c(d);else throw d;}};
DriveClient.prototype.saveFile=function(a,e,c,b,k,f,l,d,g){try{var m=0;a.saveLevel=1;var n=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var d="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?
"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(E){}}),p=mxUtils.bind(this,function(b){n(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nUserAgent="+navigator.userAgent+"\nAppVersion="+
-navigator.appVersion+"\nAppName="+navigator.appName+"\nPlatform="+navigator.platform+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nMime="+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nSaveAsPng="+(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()))+"\nRetryCount="+m+"\nError="+b+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(D){}});if(a.isEditable()&&null!=a.desc){var u=(new Date).getTime(),
-t=a.desc.etag,q=a.desc.modifiedDate,v=a.desc.headRevisionId,x=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());f=null!=f?f:!1;var y=null,A=!1,z={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(z.mimeType))z.mimeType=this.xmlMimeType,y=a.desc,A=e=!0;else if("application/octet-stream"==z.mimeType||"1"==urlParams["override-mime"]&&z.mimeType!=this.xmlMimeType)z.mimeType=this.xmlMimeType;var B=mxUtils.bind(this,function(b,k,B){try{a.saveLevel=3;a.constructor==DriveFile&&
-(null==d&&(d=[]),null==a.getChannelId()&&d.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&d.push({key:"key",value:Editor.guid(32)}),d.push({key:"secret",value:null!=g?g:Editor.guid(32)}));B||(null!=b||f||(b=this.placeholderThumbnail,k=this.placeholderMimeType),null!=b&&null!=k&&(z.thumbnail={image:b,mimeType:k}));var C=a.getData(),D=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-u,a.saveLevel=11,null==b)n({message:mxResources.get("errorSavingFile")+": Empty response"});
-else{var d=(new Date(b.modifiedDate)).getTime()-(new Date(q)).getTime();if(0>=d||t==b.etag||e&&v==b.headRevisionId){a.saveLevel=12;var f=[];0>=d&&f.push("invalid modified time");t==b.etag&&f.push("stale etag");e&&v==b.headRevisionId&&f.push("stale revision");var g=f.join(", ");n({message:mxResources.get("errorSavingFile")+": "+g},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+v+"."+q+"-"+this.ui.hashValue(t)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+
+navigator.appVersion+"\nAppName="+navigator.appName+"\nPlatform="+navigator.platform+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nMime="+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nSaveAsPng="+(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()))+"\nRetryCount="+m+"\nError="+b+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(D){}});if(a.isEditable()&&null!=a.desc){var t=(new Date).getTime(),
+u=a.desc.etag,q=a.desc.modifiedDate,v=a.desc.headRevisionId,x=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());f=null!=f?f:!1;var y=null,A=!1,z={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(z.mimeType))z.mimeType=this.xmlMimeType,y=a.desc,A=e=!0;else if("application/octet-stream"==z.mimeType||"1"==urlParams["override-mime"]&&z.mimeType!=this.xmlMimeType)z.mimeType=this.xmlMimeType;var B=mxUtils.bind(this,function(b,k,B){try{a.saveLevel=3;a.constructor==DriveFile&&
+(null==d&&(d=[]),null==a.getChannelId()&&d.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&d.push({key:"key",value:Editor.guid(32)}),d.push({key:"secret",value:null!=g?g:Editor.guid(32)}));B||(null!=b||f||(b=this.placeholderThumbnail,k=this.placeholderMimeType),null!=b&&null!=k&&(z.thumbnail={image:b,mimeType:k}));var C=a.getData(),D=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-t,a.saveLevel=11,null==b)n({message:mxResources.get("errorSavingFile")+": Empty response"});
+else{var d=(new Date(b.modifiedDate)).getTime()-(new Date(q)).getTime();if(0>=d||u==b.etag||e&&v==b.headRevisionId){a.saveLevel=12;var f=[];0>=d&&f.push("invalid modified time");u==b.etag&&f.push("stale etag");e&&v==b.headRevisionId&&f.push("stale revision");var g=f.join(", ");n({message:mxResources.get("errorSavingFile")+": "+g},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+v+"."+q+"-"+this.ui.hashValue(u)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+
this.ui.hashValue(b.etag)+(0<g.length?"-errors-"+g:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(S){}}else if(a.saveLevel=null,c(b,C),null!=y){this.executeRequest({url:"/files/"+y.id+"/revisions/"+y.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+y.id+"/revisions/"+y.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+
"-CONVERT-FILE-"+a.getHash(),action:"from_"+y.id+"."+y.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(S){}}}}catch(S){p(S)}}),E=mxUtils.bind(this,function(c,f){a.saveLevel=4;try{null!=d&&(z.properties=d);var g=l||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),k=mxUtils.bind(this,function(b){a.saveLevel=5;try{var d=a.desc.mimeType!=
this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,k=!0,l=null;try{l=window.setTimeout(mxUtils.bind(this,function(){k=!1;n({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(U){}this.executeRequest(this.createUploadRequest(a.getId(),z,c,e||b||d,f,b?null:g,A),mxUtils.bind(this,function(a){window.clearTimeout(l);k&&D(a)}),mxUtils.bind(this,function(b){window.clearTimeout(l);if(k){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+
this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==g)if(m<this.staleEtagMaxRetries){m++;var d=2*m*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(B,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",m,"delay",d)}else{B(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?
"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(T){}}else"1"==urlParams.test&&c.headRevisionId==v&&EditorUi.debug("DriveClient: Remote Etag Changed","local",g,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),n(b,c)}catch(T){p(T)}}),mxUtils.bind(this,function(){n(b)})):
-n(b)}catch(Z){p(Z)}}}))}catch(U){p(U)}}),B=mxUtils.bind(this,function(b){a.saveLevel=9;if(b)k(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(V){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=e&&e.headRevisionId==v?("1"==urlParams.test&&g!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
-"from",g,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),g=e.etag,k(b)):n({error:{code:412}},e)}catch(U){p(U)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,n(b))}))}});if(x&&null==b){a.saveLevel=8;var q=new Image;q.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/q.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(q.height*a);b.getContext("2d").drawImage(q,0,0,b.width,b.height);var c=b.toDataURL(),
-c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");z.thumbnail={image:c,mimeType:"image/png"};B(!1)}catch(V){try{B(!1)}catch(U){p(U)}}});q.src="data:image/png;base64,"+c}else B(!1)}catch(aa){p(aa)}});if(x){var K=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){E(a,!0)}),n,this.ui.getCurrentFile()!=a?C:null,K.scale,K.border)}else E(C,!1)}catch(H){p(H)}});try{a.saveLevel=2,(f||x||a.constructor==DriveLibrary||!this.enableThumbnails||
+n(b)}catch(Z){p(Z)}}}))}catch(U){p(U)}}),B=mxUtils.bind(this,function(b){a.saveLevel=9;if(b||null==g)k(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(V){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=e&&e.headRevisionId==v?("1"==urlParams.test&&g!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
+"from",g,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),g=e.etag,k(b)):n({error:{code:412}},e)}catch(U){p(U)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,n(b))}))}});if(x&&null==b){a.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/t.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(t.height*a);b.getContext("2d").drawImage(t,0,0,b.width,b.height);var c=b.toDataURL(),
+c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");z.thumbnail={image:c,mimeType:"image/png"};B(!1)}catch(V){try{B(!1)}catch(U){p(U)}}});t.src="data:image/png;base64,"+c}else B(!1)}catch(aa){p(aa)}});if(x){var K=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){E(a,!0)}),n,this.ui.getCurrentFile()!=a?C:null,K.scale,K.border)}else E(C,!1)}catch(G){p(G)}});try{a.saveLevel=2,(f||x||a.constructor==DriveLibrary||!this.enableThumbnails||
"0"==urlParams.thumb||null!=z.mimeType&&"application/vnd.jgraph.mxfile"!=z.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(E){b=null}B(b,"image/png")}catch(E){p(E)}})))&&B(null,null,a.constructor!=DriveLibrary)}catch(C){p(C)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(C){p(C)}};
DriveClient.prototype.insertFile=function(a,e,c,b,k,f,l){f=null!=f?f:this.xmlMimeType;a={mimeType:f,title:a};null!=c&&(a.parents=[{kind:"drive#fileLink",id:c}]);this.executeRequest(this.createUploadRequest(null,a,e,!1,l),mxUtils.bind(this,function(a){f==this.libraryMimeType?b(new DriveLibrary(this.ui,e,a)):0==a?null!=k&&k({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,e,a))}),k)};
DriveClient.prototype.createUploadRequest=function(a,e,c,b,k,f,l){k=null!=k?k:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(d["If-Match"]=f);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(e)+
@@ -10235,7 +10238,7 @@ f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){
DropboxClient.prototype.getFile=function(a,e,c,b){b=null!=b?b:!1;var k=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&k){var f=mxUtils.bind(this,function(){var b=a.split("/");this.ui.convertFile(a,0<b.length?b[b.length-1]:a,null,this.extension,e,c)});null!=this.token?f():this.authenticate(f,c)}else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(c,d){var f=
k?c.lastIndexOf(","):-1,l=null;0<f&&(f=this.ui.extractGraphModelFromPng(c.substring(f+1)),null!=f&&0<f.length?c=f:l=new LocalFile(this,c,a,!0));e(null!=l?l:b?new DropboxLibrary(this.ui,c,d):new DropboxFile(this.ui,c,d))}),c,k)};
DropboxClient.prototype.readFile=function(a,e,c,b){var k=mxUtils.bind(this,function(l){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),m=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});m.then(mxUtils.bind(this,function(a){}));m["catch"](function(a){window.clearTimeout(g);d&&null!=a&&409==a.status&&(d=!1,c({message:mxResources.get("fileNotFound")}))});m=this.client.filesDownload(a);m.then(mxUtils.bind(this,
-function(a){window.clearTimeout(g);if(d){d=!1;try{var f=new FileReader;f.onload=mxUtils.bind(this,function(b){e(f.result,a)});b?f.readAsDataURL(a.fileBlob):f.readAsText(a.fileBlob)}catch(u){c(u)}}}));m["catch"](mxUtils.bind(this,function(a){window.clearTimeout(g);d&&(d=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
+function(a){window.clearTimeout(g);if(d){d=!1;try{var f=new FileReader;f.onload=mxUtils.bind(this,function(b){e(f.result,a)});b?f.readAsDataURL(a.fileBlob):f.readAsText(a.fileBlob)}catch(t){c(t)}}}));m["catch"](mxUtils.bind(this,function(a){window.clearTimeout(g);d&&(d=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
c)})}):this.authenticate(function(){k(!0)},c)))}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):k(a)});null===this.client.getAccessToken()?this.authenticate(function(){f(!0)},c):f(!1)};
DropboxClient.prototype.checkExists=function(a,e,c){var b=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(b,mxUtils.bind(this,function(b){c?e(!1,!0,b):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e(!0,!0,b)},function(){e(!1,!0,b)})}),function(a){e(!0,!1)})};
DropboxClient.prototype.renameFile=function(a,e,c,b){if(/[\\\/:\?\*"\|]/.test(e))b({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=e){var k=a.stat.path_display.substring(1),f=k.lastIndexOf("/");0<f&&(e=k.substring(0,f+1)+e)}null!=a&&null!=e&&a.stat.path_lower.substring(1)!==e.toLowerCase()?this.checkExists(e,mxUtils.bind(this,function(f,d,g){f?(f=mxUtils.bind(this,function(d){d=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+e,autorename:!1});this.executePromise(d,
@@ -10273,7 +10276,7 @@ OneDriveClient.prototype.authenticate=function(a,e,c){(new mxXmlRequest(this.red
OneDriveClient.prototype.authenticateStep2=function(a,e,c,b){if(null==window.onOneDriveCallback){var k=mxUtils.bind(this,function(){var f=!0,l=JSON.parse(this.getPersistentToken(!0));null!=l?(new mxXmlRequest(this.redirectUri+"?refresh_token="+l.refresh_token+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&ver=2&token="+a),null,"GET")).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),this.token=a.access_token,
a.access_token=a.access_token,a.refresh_token=a.refresh_token,a.expiresOn=Date.now()+1E3*a.expires_in,this.tokenExpiresOn=a.expiresOn,this.setPersistentToken(JSON.stringify(a),!a.remember),this.resetTokenRefresh(a.expires_in),e()):(this.clearPersistentToken(),this.setUser(null),this.token=null,401!=a.getStatus()||b?c({message:mxResources.get("accessDenied"),retry:k}):k())}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,g){var d="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+
this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&ver=2&token="+a),d=window.open(d,"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!=d&&(window.onOneDriveCallback=
-mxUtils.bind(this,function(a,d){if(f){window.onOneDriveCallback=null;f=!1;try{null==a?c({message:mxResources.get("accessDenied"),retry:k}):(null!=g&&g(),this.setUser(null),this.token=a.access_token,a.expiresOn=Date.now()+1E3*a.expires_in,this.tokenExpiresOn=a.expiresOn,a.remember=b,this.setPersistentToken(JSON.stringify(a),!b),this.resetTokenRefresh(a.expires_in),this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){e()}),c))}catch(u){c(u)}finally{null!=d&&d.close()}}else null!=d&&d.close()}),
+mxUtils.bind(this,function(a,d){if(f){window.onOneDriveCallback=null;f=!1;try{null==a?c({message:mxResources.get("accessDenied"),retry:k}):(null!=g&&g(),this.setUser(null),this.token=a.access_token,a.expiresOn=Date.now()+1E3*a.expires_in,this.tokenExpiresOn=a.expiresOn,a.remember=b,this.setPersistentToken(JSON.stringify(a),!b),this.resetTokenRefresh(a.expires_in),this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){e()}),c))}catch(t){c(t)}finally{null!=d&&d.close()}}else null!=d&&d.close()}),
d.focus())}),mxUtils.bind(this,function(){f&&(window.onOneDriveCallback=null,f=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};
OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,e){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var b=JSON.parse(c.getText());0<b.webUrl.indexOf(".sharepoint.com")?this.endpointHint=b.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var k=JSON.parse(this.getPersistentToken(!0));null!=k&&(k.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(k),!k.remember));
a();return}}catch(f){}e({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),e)};
@@ -10290,8 +10293,8 @@ OneDriveClient.prototype.insertFile=function(a,e,c,b,k,f){this.isValidFilename(a
mxResources.get("oneDriveInvalidDeviceName")})};
OneDriveClient.prototype.checkExists=function(a,e,c,b){var k="/me/drive/root";null!=a&&(k=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+k+"/children/"+encodeURIComponent(e),mxUtils.bind(this,function(a){404==a.getStatus()?b(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[e]),function(){b(!0)},function(){b(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)}))}),function(a){b(!1)},
!0)};OneDriveClient.prototype.saveFile=function(a,e,c,b){try{var k=a.getData(),f=mxUtils.bind(this,function(d){var f=this.getItemURL(a.getId());this.writeFile(f+"/content/",d,"PUT",null,mxUtils.bind(this,function(a){e(a,k)}),c,b)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)){var l=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=a?k:null,l.scale,l.border)}else f(k)}catch(d){c(d)}};
-OneDriveClient.prototype.writeFile=function(a,e,c,b,k,f,l){try{if(null!=a&&null!=e)if(4E6<=e.length)f({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 4 MB)"});else{var d=mxUtils.bind(this,function(g){try{var m=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){m=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(u){}var p=new mxXmlRequest(a,e,c);p.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");a.setRequestHeader("Authorization",
-"Bearer "+this.token);null!=l&&a.setRequestHeader("If-Match",l)});p.send(mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),k(JSON.parse(a.getText()))):g||401!==a.getStatus()?f(this.parseRequestText(a),a):this.authenticate(function(){d(!0)},f,g))}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&f(this.parseRequestText(a))}))}catch(u){f(u)}});null==this.token||6E4>this.tokenExpiresOn-
+OneDriveClient.prototype.writeFile=function(a,e,c,b,k,f,l){try{if(null!=a&&null!=e)if(4E6<=e.length)f({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 4 MB)"});else{var d=mxUtils.bind(this,function(g){try{var m=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){m=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(t){}var p=new mxXmlRequest(a,e,c);p.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");a.setRequestHeader("Authorization",
+"Bearer "+this.token);null!=l&&a.setRequestHeader("If-Match",l)});p.send(mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),k(JSON.parse(a.getText()))):g||401!==a.getStatus()?f(this.parseRequestText(a),a):this.authenticate(function(){d(!0)},f,g))}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&f(this.parseRequestText(a))}))}catch(t){f(t)}});null==this.token||6E4>this.tokenExpiresOn-
Date.now()?this.authenticate(function(){d(!0)},f):d(!1)}else f({message:mxResources.get("unknownError")})}catch(g){f(g)}};OneDriveClient.prototype.parseRequestText=function(a){var e={message:mxResources.get("unknownError")};try{e=JSON.parse(a.getText())}catch(c){}return e};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(e){a(e)})};
OneDriveClient.prototype.pickFolder=function(a,e){var c=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){a(b);mxClient.IS_IE11&&(this.token=b.accessToken)}),cancel:mxUtils.bind(this,function(){}),
error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})});b?c():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){a({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),c,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){c(!1)}),this.emptyFn):c(e)};
@@ -10308,18 +10311,18 @@ c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;n
GitHubClient.prototype.updateUser=function(a,e,c){var b=!0,k=window.setTimeout(mxUtils.bind(this,function(){b=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),f=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),l=this.authToken+" "+this.token;f.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",l)};f.send(mxUtils.bind(this,function(){window.clearTimeout(k);b&&(401===f.getStatus()?c?e({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,
function(){this.updateUser(a,e,!0)}),e)):200>f.getStatus()||300<=f.getStatus()?e({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(f.getText()))),a()))}),e)};GitHubClient.prototype.createUser=function(a){return new DrawioUser(a.id,a.email,a.name)};
GitHubClient.prototype.authenticate=function(a,e){if(null==window.onGitHubCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(k,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(l,d){if(b)if(window.onGitHubCallback=null,b=!1,null==l)e({message:mxResources.get("accessDenied"),retry:c});else{var g=mxUtils.bind(this,function(){var b=
-!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+l,mxUtils.bind(this,function(g){window.clearTimeout(c);if(b)try{if(200>g.getStatus()||300<=g.getStatus())e({message:mxResources.get("cannotLogin")});else{null!=f&&f();var l=g.getText();this.token=l.substring(l.indexOf("=")+1,l.indexOf("&"));this.setUser(null);k&&this.setPersistentToken(this.token);a()}}catch(t){e(t)}finally{null!=d&&
+!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+l,mxUtils.bind(this,function(g){window.clearTimeout(c);if(b)try{if(200>g.getStatus()||300<=g.getStatus())e({message:mxResources.get("cannotLogin")});else{null!=f&&f();var l=g.getText();this.token=l.substring(l.indexOf("=")+1,l.indexOf("&"));this.setUser(null);k&&this.setPersistentToken(this.token);a()}}catch(u){e(u)}finally{null!=d&&
d.close()}}))});g()}else null!=d&&d.close()}):e({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitHubCallback=null,b=!1,e({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else e({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,e){try{var c=JSON.parse(a.getText());null!=c&&null!=c.message&&(e=c.message)}catch(b){}return e};
GitHubClient.prototype.executeRequest=function(a,e,c,b){var k=mxUtils.bind(this,function(l){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),m=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(g);if(d)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())e(a);else if(401===a.getStatus())l?c({code:a.getStatus(),
-message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===a.getStatus()){var m=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(m="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(m?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?
+message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===a.getStatus()){var m=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(m="too_large"==p.errors[0].code)}catch(t){}c({message:mxResources.get(m?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?
c({code:a.getStatus(),status:409}):c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),mxUtils.bind(this,function(a){window.clearTimeout(g);d&&c(a)}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):k(a)});null==this.token?this.authenticate(function(){f(!0)},c):f(!1)};GitHubClient.prototype.getLibrary=function(a,e,c){this.getFile(a,e,c,!0)};
GitHubClient.prototype.getSha=function(a,e,c,b,k,f){var l="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+e+"/contents/"+c+"?ref="+b+l,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{k(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(g){f(g)}}),f)};
GitHubClient.prototype.getFile=function(a,e,c,b,k){b=null!=b?b:!1;var f=a.split("/"),l=f[0],d=f[1],g=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);if(!k&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&f))if(null!=this.token){k=this.baseUrl+"/repos/"+l+"/"+d+"/contents/"+a+"?ref="+g;var m={Authorization:"token "+this.token},f=a.split("/");this.ui.convertFile(k,0<f.length?f[f.length-1]:a,null,this.extension,e,c,null,m)}else c({message:mxResources.get("accessDenied")});
else f="&t="+(new Date).getTime(),a=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+d+"/contents/"+a+"?ref="+g+f,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{e(this.createGitHubFile(l,d,g,JSON.parse(a.getText()),b))}catch(p){c(p)}}),c)};
GitHubClient.prototype.createGitHubFile=function(a,e,c,b,k){a={org:a,repo:e,ref:c,name:b.name,path:b.path,sha:b.sha,html_url:b.html_url,download_url:b.download_url};e=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(b.name)?e="data:image/jpeg;base64,"+e:/\.gif$/i.test(b.name)?e="data:image/gif;base64,"+e:/\.png$/i.test(b.name)?(b=this.ui.extractGraphModelFromPng(e),e=null!=b&&0<b.length?b:"data:image/png;base64,"+e):e=Base64.decode(e));return k?new GitHubLibrary(this.ui,e,a):new GitHubFile(this.ui,
e,a)};GitHubClient.prototype.insertLibrary=function(a,e,c,b,k){this.insertFile(a,e,c,b,!0,k,!1)};
-GitHubClient.prototype.insertFile=function(a,e,c,b,k,f,l){k=null!=k?k:!1;f=f.split("/");var d=f[0],g=f[1],m=f[2],n=f.slice(3,f.length).join("/");0<n.length&&(n+="/");n+=a;this.checkExists(d+"/"+g+"/"+m+"/"+n,!0,mxUtils.bind(this,function(f,u){f?k?(l||(e=Base64.encode(e)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(d,g,m,n,a,e,u,mxUtils.bind(this,function(a){try{var e=JSON.parse(a.getText());c(this.createGitHubFile(d,g,m,e.content,k))}catch(x){b(x)}}),b)}),b)):c(new GitHubFile(this.ui,
-e,{org:d,repo:g,ref:m,name:a,path:n,sha:u,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,e,c,b){var k=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(e?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){k();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
+GitHubClient.prototype.insertFile=function(a,e,c,b,k,f,l){k=null!=k?k:!1;f=f.split("/");var d=f[0],g=f[1],m=f[2],n=f.slice(3,f.length).join("/");0<n.length&&(n+="/");n+=a;this.checkExists(d+"/"+g+"/"+m+"/"+n,!0,mxUtils.bind(this,function(f,t){f?k?(l||(e=Base64.encode(e)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(d,g,m,n,a,e,t,mxUtils.bind(this,function(a){try{var e=JSON.parse(a.getText());c(this.createGitHubFile(d,g,m,e.content,k))}catch(x){b(x)}}),b)}),b)):c(new GitHubFile(this.ui,
+e,{org:d,repo:g,ref:m,name:a,path:n,sha:t,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,e,c,b){var k=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(e?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){k();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
GitHubClient.prototype.writeFile=function(a,e,c,b,k,f,l,d,g){f.length>=this.maxFileSize?g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(c={path:b,branch:decodeURIComponent(c),message:k,content:f},null!=l&&(c.sha=l),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+e+"/contents/"+b,JSON.stringify(c),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink="https://github.com/settings/connections/applications/"+
this.clientId,a.code=null);g(a)})))};
GitHubClient.prototype.checkExists=function(a,e,c){var b=a.split("/"),k=b[0],f=b[1],l=b[2];a=b.slice(3,b.length).join("/");this.getSha(k,f,a,l,mxUtils.bind(this,function(b){if(e){var d=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){d();c(!0,b)},function(){d();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(a){c(!0)}),null,!0)};
@@ -10327,18 +10330,18 @@ GitHubClient.prototype.saveFile=function(a,e,c,b,k){var f=a.meta.org,l=a.meta.re
b)}),c,this.ui.getCurrentFile()!=a?a.getData():null,b.scale,b.border)}else m(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(f,l,g,d,mxUtils.bind(this,function(b){a.meta.sha=b;n()}),c):n()};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,e){var c=null,b=null,k=null,f=null,l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.height="304px";var d=document.createElement("h3");mxUtils.write(d,mxResources.get(a?"selectFile":"selectFolder"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(d);var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.border="1px solid lightgray";g.style.boxSizing=
"border-box";g.style.padding="4px";g.style.overflow="auto";g.style.lineHeight="1.2em";g.style.height="274px";l.appendChild(g);var m=document.createElement("div");m.style.textOverflow="ellipsis";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.padding="4px";m.style.width="100%";var n=new CustomDialog(this.ui,l,mxUtils.bind(this,function(){e(c+"/"+b+"/"+encodeURIComponent(k)+"/"+f)}));this.ui.showDialog(n.container,420,360,!0,!0);a&&n.okButton.parentNode.removeChild(n.okButton);var p=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("title",a);d.style.cursor="pointer";mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=m.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),u=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(k),mxUtils.bind(this,function(){f=
-null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");x()})))})(a)}g.appendChild(d)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=k=b=c=null,A()):this.ui.hideDialog()}))}),q=null,v=null,x=mxUtils.bind(this,function(d){null==d&&(g.innerHTML="",d=1);var l=new mxXmlRequest(this.baseUrl+
+mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("title",a);d.style.cursor="pointer";mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=m.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),t=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(k),mxUtils.bind(this,function(){f=
+null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");x()})))})(a)}g.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=k=b=c=null,A()):this.ui.hideDialog()}))}),q=null,v=null,x=mxUtils.bind(this,function(d){null==d&&(g.innerHTML="",d=1);var l=new mxXmlRequest(this.baseUrl+
"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(k)+"&per_page=100&page="+d,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));n.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var z=mxUtils.bind(this,function(){x(d+1)});mxEvent.addListener(q,"click",
-z);this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==d&&(u(),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(g,mxResources.get("noFiles"));else{var z=!0,B=0;l=mxUtils.bind(this,function(d){for(var l=0;l<n.length;l++)mxUtils.bind(this,function(l,n){if(d==("dir"==l.type)){var v=m.cloneNode();v.style.backgroundColor=
+z);this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==d&&(t(),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(g,mxResources.get("noFiles"));else{var z=!0,B=0;l=mxUtils.bind(this,function(d){for(var l=0;l<n.length;l++)mxUtils.bind(this,function(l,n){if(d==("dir"==l.type)){var v=m.cloneNode();v.style.backgroundColor=
z?"dark"==uiTheme?"#000000":"#eeeeee":"";z=!z;var q=document.createElement("img");q.src=IMAGE_PATH+"/"+("dir"==l.type?"folder.png":"file.png");q.setAttribute("align","absmiddle");q.style.marginRight="4px";q.style.marginTop="-4px";q.width=20;v.appendChild(q);v.appendChild(p(l.name+("dir"==l.type?"/":""),mxUtils.bind(this,function(){"dir"==l.type?(f=l.path,x()):a&&"file"==l.type&&(this.ui.hideDialog(),e(c+"/"+b+"/"+encodeURIComponent(k)+"/"+l.path))})));g.appendChild(v);B++}})(n[l],l)});l(!0);a&&l(!1)}}),
-t,!0)}),y=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");
-var e=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(u(!0),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(g,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=m.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,
-mxUtils.bind(this,function(){k=a.name;f="";x()})));g.appendChild(c)})(b[c],c);100==b.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}}),t)}),A=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&mxEvent.removeListener(g,"scroll",
+u,!0)}),y=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");
+var e=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(t(!0),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(g,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=m.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,
+mxUtils.bind(this,function(){k=a.name;f="";x()})));g.appendChild(c)})(b[c],c);100==b.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}}),u)}),A=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&mxEvent.removeListener(g,"scroll",
v);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(g,mxResources.get("noFiles"));else{1==a&&(g.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,
function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var d=a.split("/");if(1<d.length){a=d[0];var e=d[1];3>d.length?(c=a,b=e,f=k=null,y()):this.ui.spinner.spin(g,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+e+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;b=a.meta.repo;k=decodeURIComponent(a.meta.ref);f="";x()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();
this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(g),mxUtils.br(g));for(var l=0;l<d.length;l++)mxUtils.bind(this,function(a,d){var e=m.cloneNode();e.style.backgroundColor=0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";e.appendChild(p(a.full_name,mxUtils.bind(this,function(){c=a.owner.login;b=
-a.name;k=a.default_branch;f="";x()})));g.appendChild(e)})(d[l],l)}100==d.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}),t)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,e,c){DrawioFile.call(this,a,e);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+a.name;k=a.default_branch;f="";x()})));g.appendChild(e)})(d[l],l)}100==d.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}),u)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,e,c){DrawioFile.call(this,a,e);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(a,e,c){this.doSave(this.getTitle(),e,c)};TrelloFile.prototype.saveAs=function(a,e,c){this.doSave(a,e,c)};TrelloFile.prototype.doSave=function(a,e,c){var b=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=b;this.saveFile(a,!1,e,c)}),c])};
TrelloFile.prototype.saveFile=function(a,e,c,b){this.isEditable()?this.savingFile?null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==a?this.ui.trello.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=k;this.contentChanged();null!=c&&c();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,e,c,b))}),mxUtils.bind(this,
function(a){this.savingFile=!1;null!=b&&b(a)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(k){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(f){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(f);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,e,c,b))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,k)}))):null!=c&&c()};TrelloLibrary=function(a,e,c){TrelloFile.call(this,a,e,c)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,e,c){this.saveFile(a,!1,e,c)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
@@ -10355,27 +10358,27 @@ TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(thi
TrelloClient.prototype.showTrelloDialog=function(a,e){var c=null,b="@me",k=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,a?mxResources.get("selectFile"):mxResources.get("selectCard"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="auto";d.style.height=
"194px";f.appendChild(d);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var g=mxUtils.bind(this,function(a,b,c){k++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==k%2?"dark"==uiTheme?"#000":"#eee":"dark"==uiTheme?"":"#fff");var e=document.createElement("a");e.style.cursor="pointer";if(null!=c){var f=document.createElement("img");
f.src=c.url;f.width=c.width;f.height=c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),m=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),n=mxUtils.bind(this,function(){k=0;d.innerHTML="";this.ui.spinner.spin(d,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(a){this.ui.spinner.stop();d.appendChild(g("../ [Up]",mxUtils.bind(this,function(){t()})));mxUtils.br(d);null==a||0==a.length?mxUtils.write(d,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){d.appendChild(g(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==
-b.status?this.authenticate(a,m,!0):null!=m&&m(b)}))});a()}),p=null,u=null,t=mxUtils.bind(this,function(f){null==f&&(k=0,d.innerHTML="",f=1);this.ui.spinner.spin(d,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){mxEvent.removeListener(d,"scroll",u);t(f+1)});mxEvent.addListener(p,"click",l);var q=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(k){this.ui.spinner.stop();k=null!=k?k.cards:null;if(null==k||0==k.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==f&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=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(d));for(var m=0;m<k.length;m++)mxUtils.bind(this,function(b){d.appendChild(g(b.name,mxUtils.bind(this,function(){a?(c=b.id,n()):(this.ui.hideDialog(),e(b.id))})))})(k[m]);100==k.length&&(d.appendChild(p),u=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&l()},mxEvent.addListener(d,"scroll",u))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(q,m,!0):null!=m&&m({message:a.responseText})}))});q()});t()};
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(a){this.ui.spinner.stop();d.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(d);null==a||0==a.length?mxUtils.write(d,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){d.appendChild(g(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==
+b.status?this.authenticate(a,m,!0):null!=m&&m(b)}))});a()}),p=null,t=null,u=mxUtils.bind(this,function(f){null==f&&(k=0,d.innerHTML="",f=1);this.ui.spinner.spin(d,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){mxEvent.removeListener(d,"scroll",t);u(f+1)});mxEvent.addListener(p,"click",l);var q=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(k){this.ui.spinner.stop();k=null!=k?k.cards:null;if(null==k||0==k.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==f&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=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(d));for(var m=0;m<k.length;m++)mxUtils.bind(this,function(b){d.appendChild(g(b.name,mxUtils.bind(this,function(){a?(c=b.id,n()):(this.ui.hideDialog(),e(b.id))})))})(k[m]);100==k.length&&(d.appendChild(p),t=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&l()},mxEvent.addListener(d,"scroll",t))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(q,m,!0):null!=m&&m({message:a.responseText})}))});q()});u()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(a,e,c){GitHubFile.call(this,a,e,c);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink("https://gitlab.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(a){return null!=a&&400==a.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(a){return a.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(a,e){a.last_commit_id=e};GitLabLibrary=function(a,e,c){GitLabFile.call(this,a,e,c)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,e,c){this.saveFile(a,!1,e,c)};GitLabLibrary.prototype.open=function(){};GitLabClient=function(a){GitHubClient.call(this,a,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.authToken="Bearer";
GitLabClient.prototype.authenticate=function(a,e){if(null==window.onGitLabCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(k,f){var l=window.location.href,l=l.substring(0,l.lastIndexOf("/")),l=encodeURIComponent(l+"/gitlab.html");null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+l+"&response_type=token&state=123","gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,
function(d,g){b?(window.onGitLabCallback=null,b=!1,null==d?e({message:mxResources.get("accessDenied"),retry:c}):(null!=f&&f(),this.token=d,this.setUser(null),k&&this.setPersistentToken(this.token),a())):null!=g&&g.close()}):e({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitLabCallback=null,b=!1,e({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else e({code:App.ERROR_BUSY})};
GitLabClient.prototype.executeRequest=function(a,e,c,b){var k=mxUtils.bind(this,function(l){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),m=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",m);a.setRequestHeader("PRIVATE_TOKEN",m);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(g);if(d)if(200<=
-a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())e(a);else if(401===a.getStatus())l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===a.getStatus()){var m=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(m="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(m?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({message:this.getErrorMessage(a,
+a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())e(a);else if(401===a.getStatus())l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===a.getStatus()){var m=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(m="too_large"==p.errors[0].code)}catch(t){}c({message:mxResources.get(m?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({message:this.getErrorMessage(a,
mxResources.get("fileNotFound"))}):400===a.getStatus()?c({status:400}):c({status:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),mxUtils.bind(this,function(a){window.clearTimeout(g);d&&c(a)}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):k(a)});null==this.token?this.authenticate(function(){f(!0)},c):f(!1)};
-GitLabClient.prototype.getRefIndex=function(a,e,c,b,k,f){if(null!=k)c(a,k);else{var l=a.length-2,d=mxUtils.bind(this,function(){if(2>l)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(l-1,0),k=a.slice(0,g).join("/"),g=a[g],n=a[l],p=a.slice(l+1,a.length).join("/"),k=this.baseUrl+"/projects/"+encodeURIComponent(k+"/"+g)+"/repository/"+(e?f?"branches?per_page=1&page=1&ref="+n:"tree?path="+p+"&ref="+n:"files/"+encodeURIComponent(p)+"?ref="+n),u=new mxXmlRequest(k,null,"HEAD");this.executeRequest(u,
-mxUtils.bind(this,function(){200==u.getStatus()?c(a,l):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==u.getStatus()?(l--,d()):b({message:mxResources.get("fileNotFound")})}))}});d()}};
-GitLabClient.prototype.getFile=function(a,e,c,b,k,f){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(f,d){var g=Math.max(d-1,0),l=f.slice(0,g).join("/"),n=f[g],p=f[d];a=f.slice(d+1,f.length).join("/");g=/\.png$/i.test(a);if(!k&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&g))if(null!=this.token){var g="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/files/"+encodeURIComponent(a)+
-"?ref="+p;f=a.split("/");this.ui.convertFile(u+g,0<f.length?f[f.length-1]:a,null,this.extension,e,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(y){c(y)}}),c)}))}else c({message:mxResources.get("accessDenied")});else g="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/files/"+encodeURIComponent(a)+"?ref="+p,g=new mxXmlRequest(u+
+GitLabClient.prototype.getRefIndex=function(a,e,c,b,k,f){if(null!=k)c(a,k);else{var l=a.length-2,d=mxUtils.bind(this,function(){if(2>l)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(l-1,0),k=a.slice(0,g).join("/"),g=a[g],n=a[l],p=a.slice(l+1,a.length).join("/"),k=this.baseUrl+"/projects/"+encodeURIComponent(k+"/"+g)+"/repository/"+(e?f?"branches?per_page=1&page=1&ref="+n:"tree?path="+p+"&ref="+n:"files/"+encodeURIComponent(p)+"?ref="+n),t=new mxXmlRequest(k,null,"HEAD");this.executeRequest(t,
+mxUtils.bind(this,function(){200==t.getStatus()?c(a,l):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==t.getStatus()?(l--,d()):b({message:mxResources.get("fileNotFound")})}))}});d()}};
+GitLabClient.prototype.getFile=function(a,e,c,b,k,f){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(f,d){var g=Math.max(d-1,0),l=f.slice(0,g).join("/"),n=f[g],p=f[d];a=f.slice(d+1,f.length).join("/");g=/\.png$/i.test(a);if(!k&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&g))if(null!=this.token){var g="&t="+(new Date).getTime(),t=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/files/"+encodeURIComponent(a)+
+"?ref="+p;f=a.split("/");this.ui.convertFile(t+g,0<f.length?f[f.length-1]:a,null,this.extension,e,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(y){c(y)}}),c)}))}else c({message:mxResources.get("accessDenied")});else g="&t="+(new Date).getTime(),t=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/files/"+encodeURIComponent(a)+"?ref="+p,g=new mxXmlRequest(t+
g,null,"GET"),this.executeRequest(g,mxUtils.bind(this,function(a){try{e(this.createGitLabFile(l,n,p,JSON.parse(a.getText()),b,d))}catch(q){c(q)}}),c)}),c,f)};
GitLabClient.prototype.getFileContent=function(a){var e=a.file_name,c=a.content;"base64"===a.encoding&&(/\.jpe?g$/i.test(e)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(e)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(e)?c="data:application/pdf;base64,"+c:/\.png$/i.test(e)?(a=this.ui.extractGraphModelFromPng(c),c=null!=a&&0<a.length?a:"data:image/png;base64,"+c):c=Base64.decode(c));return c};
GitLabClient.prototype.createGitLabFile=function(a,e,c,b,k,f){var l=DRAWIO_GITLAB_URL+"/";a={org:a,repo:e,ref:c,name:b.file_name,path:b.file_path,html_url:l+a+"/"+e+"/blob/"+c+"/"+b.file_path,download_url:l+a+"/"+e+"/raw/"+c+"/"+b.file_path+"?inline=false",last_commit_id:b.last_commit_id,refPos:f};b=this.getFileContent(b);return k?new GitLabLibrary(this.ui,b,a):new GitLabFile(this.ui,b,a)};
-GitLabClient.prototype.insertFile=function(a,e,c,b,k,f,l){k=null!=k?k:!1;f=f.split("/");this.getRefIndex(f,!0,mxUtils.bind(this,function(d,f){var g=Math.max(f-1,0),n=d.slice(0,g).join("/"),p=d[g],u=d[f];path=d.slice(f+1,d.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(n+"/"+p+"/"+u+"/"+path,!0,mxUtils.bind(this,function(d,g){if(d)if(k)l||(e=Base64.encode(e)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,p,u,path,a,e,g,mxUtils.bind(this,function(a){try{var d=
-JSON.parse(a.getText());c(this.createGitLabFile(n,p,u,d.content,k,f))}catch(z){b(z)}}),b)}),b);else{var m=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,e,{org:n,repo:p,ref:u,name:a,path:path,html_url:m+n+"/"+p+"/blob/"+u+"/"+path,download_url:m+n+"/"+p+"/raw/"+u+"/"+path+"?inline=false",refPos:f,last_commit_id:g,isNew:!0}))}else b()}))}),b,null,4>=f.length)};
+GitLabClient.prototype.insertFile=function(a,e,c,b,k,f,l){k=null!=k?k:!1;f=f.split("/");this.getRefIndex(f,!0,mxUtils.bind(this,function(d,f){var g=Math.max(f-1,0),n=d.slice(0,g).join("/"),p=d[g],t=d[f];path=d.slice(f+1,d.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(n+"/"+p+"/"+t+"/"+path,!0,mxUtils.bind(this,function(d,g){if(d)if(k)l||(e=Base64.encode(e)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,p,t,path,a,e,g,mxUtils.bind(this,function(a){try{var d=
+JSON.parse(a.getText());c(this.createGitLabFile(n,p,t,d.content,k,f))}catch(z){b(z)}}),b)}),b);else{var m=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,e,{org:n,repo:p,ref:t,name:a,path:path,html_url:m+n+"/"+p+"/blob/"+t+"/"+path,download_url:m+n+"/"+p+"/raw/"+t+"/"+path+"?inline=false",refPos:f,last_commit_id:g,isNew:!0}))}else b()}))}),b,null,4>=f.length)};
GitLabClient.prototype.checkExists=function(a,e,c){this.getFile(a,mxUtils.bind(this,function(b){if(e){var k=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){k();c(!0,b.getCurrentEtag())},function(){k();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(a){c(!0)}),null,!0)};
GitLabClient.prototype.writeFile=function(a,e,c,b,k,f,l,d,g){if(f.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"});else{var m="POST";c={path:encodeURIComponent(b),branch:decodeURIComponent(c),commit_message:k,content:f,encoding:"base64"};null!=l&&(c.last_commit_id=l,m="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+e)+"/repository/files/"+encodeURIComponent(b);m=new mxXmlRequest(a,JSON.stringify(c),m);this.executeRequest(m,
mxUtils.bind(this,function(a){d(a)}),g)}};
@@ -10384,20 +10387,20 @@ this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(a.meta.last_commit_id,b)}
GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};
GitLabClient.prototype.showGitLabDialog=function(a,e){var c=null,b=null,k=null,f=null,l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.height="304px";var d=document.createElement("h3");mxUtils.write(d,mxResources.get(a?"selectFile":"selectFolder"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(d);var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.border="1px solid lightgray";g.style.boxSizing=
"border-box";g.style.padding="4px";g.style.overflow="auto";g.style.lineHeight="1.2em";g.style.height="274px";l.appendChild(g);var m=document.createElement("div");m.style.textOverflow="ellipsis";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.padding="4px";m.style.width="100%";var n=new CustomDialog(this.ui,l,mxUtils.bind(this,function(){e(c+"/"+b+"/"+encodeURIComponent(k)+"/"+f)}));this.ui.showDialog(n.container,420,360,!0,!0);a&&n.okButton.parentNode.removeChild(n.okButton);var p=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("title",a);d.style.cursor="pointer";mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=m.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),u=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(k),mxUtils.bind(this,function(){f=
-null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");x()})))})(a)}g.appendChild(d)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=k=b=c=null,A()):this.ui.hideDialog()}))}),q=null,v=null,x=mxUtils.bind(this,function(d){null==d&&(g.innerHTML="",d=1);var l=new mxXmlRequest(this.baseUrl+
+mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("title",a);d.style.cursor="pointer";mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=m.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),t=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(k),mxUtils.bind(this,function(){f=
+null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");x()})))})(a)}g.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=k=b=c=null,A()):this.ui.hideDialog()}))}),q=null,v=null,x=mxUtils.bind(this,function(d){null==d&&(g.innerHTML="",d=1);var l=new mxXmlRequest(this.baseUrl+
"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+k+"&per_page=100&page="+d,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));n.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var z=mxUtils.bind(this,function(){x(d+1)});mxEvent.addListener(q,
-"click",z);this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==d&&(u(!k),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(g,mxResources.get("noFiles"));else{var B=!0,t=0;l=mxUtils.bind(this,function(d){for(var l=0;l<n.length;l++)mxUtils.bind(this,function(l){if(d==("tree"==l.type)){var n=m.cloneNode();n.style.backgroundColor=
-B?"dark"==uiTheme?"#000000":"#eeeeee":"";B=!B;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==l.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;n.appendChild(z);n.appendChild(p(l.name+("tree"==l.type?"/":""),mxUtils.bind(this,function(){"tree"==l.type?(f=l.path,x()):a&&"blob"==l.type&&(this.ui.hideDialog(),e(c+"/"+b+"/"+k+"/"+l.path))})));g.appendChild(n);t++}})(n[l])});l(!0);a&&l(!1);100==t&&(g.appendChild(q),
-v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&z()},mxEvent.addListener(g,"scroll",v))}}),t,!0)}),y=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);
-q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(u(!0),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(g,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,
-function(a,b){var c=m.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){k=encodeURIComponent(a.name);f="";x()})));g.appendChild(c)})(b[c],c);100==b.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}}),t)});n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));var A=mxUtils.bind(this,function(a){this.ui.spinner.stop();
+"click",z);this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==d&&(t(!k),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(g,mxResources.get("noFiles"));else{var B=!0,u=0;l=mxUtils.bind(this,function(d){for(var l=0;l<n.length;l++)mxUtils.bind(this,function(l){if(d==("tree"==l.type)){var n=m.cloneNode();n.style.backgroundColor=
+B?"dark"==uiTheme?"#000000":"#eeeeee":"";B=!B;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==l.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;n.appendChild(z);n.appendChild(p(l.name+("tree"==l.type?"/":""),mxUtils.bind(this,function(){"tree"==l.type?(f=l.path,x()):a&&"blob"==l.type&&(this.ui.hideDialog(),e(c+"/"+b+"/"+k+"/"+l.path))})));g.appendChild(n);u++}})(n[l])});l(!0);a&&l(!1);100==u&&(g.appendChild(q),
+v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&z()},mxEvent.addListener(g,"scroll",v))}}),u,!0)}),y=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);
+q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(t(!0),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(g,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,
+function(a,b){var c=m.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){k=encodeURIComponent(a.name);f="";x()})));g.appendChild(c)})(b[c],c);100==b.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}}),u)});n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));var A=mxUtils.bind(this,function(a){this.ui.spinner.stop();
null==a&&(g.innerHTML="",a=1);null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(q,"click",d);var e=mxUtils.bind(this,function(a){this.ui.spinner.spin(g,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");
-this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),t)}),l=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(g,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),t)});e(mxUtils.bind(this,function(e){var n=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+
+this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),u)}),l=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(g,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),u)});e(mxUtils.bind(this,function(e){var n=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+
a,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();n=JSON.parse(n.getText());if(null!=n&&0!=n.length||null!=e&&0!=e.length){1==a&&(g.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(c=a[0],b=a[1],k="master",f=null,2<a.length&&(f=encodeURIComponent(a.slice(2,
a.length).join("/"))),x()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(g),mxUtils.br(g));for(var z=0;z<n.length;z++)mxUtils.bind(this,function(a,d){var e=m.cloneNode();e.style.backgroundColor=0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";e.appendChild(p(a.name_with_namespace,mxUtils.bind(this,function(){c=a.owner.username;b=a.path;k=a.default_branch||"master";
f="";x()})));g.appendChild(e)})(n[z],z);for(z=0;z<e.length;z++)l(e[z],mxUtils.bind(this,function(a,d){for(var e=0;e<d.length;e++){var l=m.cloneNode();l.style.backgroundColor=0==idx%2?"dark"==uiTheme?"#000000":"#eeeeee":"";mxUtils.bind(this,function(d){l.appendChild(p(d.name_with_namespace,mxUtils.bind(this,function(){c=a.full_path;b=d.path;k=d.default_branch||"master";f="";x()})));g.appendChild(l)})(d[e])}}))}else mxUtils.write(g,mxResources.get("noFiles"));100==n.length&&(g.appendChild(q),v=function(){g.scrollTop>=
-g.scrollHeight-g.offsetHeight&&d()},mxEvent.addListener(g,"scroll",v))}),t)}))});this.token?this.user?A():this.updateUser(function(){A()},t,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){A()},t,!0)}),t)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,e,c,b,k,f,l){this.file=a;this.id=e;this.content=c;this.modifiedDate=b;this.createdDate=k;this.isResolved=f;this.user=l;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,e,c,b,k){e()};DrawioComment.prototype.editComment=function(a,e,c){e()};DrawioComment.prototype.deleteComment=function(a,e){a()};DriveComment=function(a,e,c,b,k,f,l,d){DrawioComment.call(this,a,e,c,b,k,f,l);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,e,c,b,k){a={content:a.content};b?a.verb="resolve":k&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){e(a.replyId)}),c)};
+g.scrollHeight-g.offsetHeight&&d()},mxEvent.addListener(g,"scroll",v))}),u)}))});this.token?this.user?A():this.updateUser(function(){A()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){A()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,e,c,b,k,f,l){this.file=a;this.id=e;this.content=c;this.modifiedDate=b;this.createdDate=k;this.isResolved=f;this.user=l;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,e,c,b,k){e()};DrawioComment.prototype.editComment=function(a,e,c){e()};DrawioComment.prototype.deleteComment=function(a,e){a()};DriveComment=function(a,e,c,b,k,f,l,d){DrawioComment.call(this,a,e,c,b,k,f,l);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,e,c,b,k){a={content:a.content};b?a.verb="resolve":k&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){e(a.replyId)}),c)};
DriveComment.prototype.editComment=function(a,e,c){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},e,c)};
DriveComment.prototype.deleteComment=function(a,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},a,e)};App=function(a,e,c){EditorUi.call(this,a,e,null!=c?c:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var c={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};
@@ -10427,7 +10430,7 @@ mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),mxStencilRegistr
if("0"!=urlParams.plugins&&"1"!=urlParams.offline){k=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var f=JSON.parse(localStorage.getItem(mxSettings.key));null!=f&&(k=f.plugins)}catch(n){}f=urlParams.p;App.initPluginCallback();null!=f&&App.loadPlugins(f.split(";"));if(null!=k&&0<k.length&&"0"!=urlParams.plugins){for(var f=window.location.protocol+"//"+window.location.host,l=!0,d=0;d<k.length&&l;d++)"/"!=k[d].charAt(0)&&
k[d].substring(0,f.length)!=f&&(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",[k.join("\n")]).replace(/\\n/g,"\n")))for(d=0;d<k.length;d++)try{null==App.pluginsLoaded[k[d]]&&(App.pluginsLoaded[k[d]]=!0,App.embedModePluginsCount++,"/"==k[d].charAt(0)&&(k[d]=PLUGINS_BASE_PATH+
k[d]),mxscript(k[d]))}catch(n){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var g=
-window.opener||window.parent,m=function(a){if(a.source==g)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",m),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(u){null!=window.console&&console.log("Error in configure message: "+u,a.data)}};mxEvent.addListener(window,"message",m);g.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",
+window.opener||window.parent,m=function(a){if(a.source==g)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",m),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(t){null!=window.console&&console.log("Error in configure message: "+t,a.data)}};mxEvent.addListener(window,"message",m);g.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",
window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(n){null!=window.console&&console.error(n)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(k=localStorage.getItem(".configuration"),null!=k))try{k=JSON.parse(k),null!=k&&(EditorUi.debug("Using local configuration",k),Editor.configure(k),mxSettings.load())}catch(n){null!=window.console&&console.error(n)}}b()}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=64";
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=":
@@ -10440,7 +10443,7 @@ App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;
App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
App.loadPlugins=function(a,e){EditorUi.debug("Loading plugins",a);for(var c=0;c<a.length;c++)if(null!=a[c]&&0<a[c].length)try{var b=App.pluginRegistry[a[c]];null!=b?null==App.pluginsLoaded[b]&&(App.pluginsLoaded[b]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(b):mxscript(b):e?mxinclude(b):mxscript(drawDevUrl+b)):null!=window.console&&console.log("Unknown plugin:",a[c])}catch(k){null!=window.console&&console.log("Error loading plugin:",a[c],k)}};
-App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&null!=window.console&&console.warn("[Deprecation] app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
+App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var a=window.opener||window.parent;null!=a&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){a.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
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()}));
this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));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",
@@ -10469,7 +10472,7 @@ 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,e=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=e&&(a=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+a);document.title!=a&&(document.title=a,a=this.editor.graph,a.invalidateDescendantsWithPlaceholders(a.model.getRoot()),a.view.validate())}};
App.prototype.getThumbnail=function(a,e){var c=!1;try{var b=!0,k=window.setTimeout(mxUtils.bind(this,function(){b=!1;e(null)}),this.timeout),f=mxUtils.bind(this,function(a){window.clearTimeout(k);b&&e(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var l=this.editor.graph,d=null!=l.themes&&"darkTheme"==l.defaultThemeName;if(d||null!=this.pages&&this.currentPage!=this.pages[0]){var g=l.getGlobalVariable,l=this.createTemporaryGraph(d?l.getDefaultStylesheet():l.getStylesheet()),m=this.pages[0];
d&&(l.defaultThemeName="default");l.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:g.apply(this,arguments)};l.getGlobalVariable=g;document.body.appendChild(l.container);l.model.setRoot(m.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(a){try{l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}catch(C){a=null}f(a)}),a,this.thumbImageCache,"#ffffff",function(){f()},
-null,null,null,null,null,null,l),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var n=document.createElement("canvas"),p=l.getGraphBounds(),u=a/p.width,u=Math.min(1,Math.min(3*a/(4*p.height),u)),t=Math.floor(p.x),q=Math.floor(p.y);n.setAttribute("width",Math.ceil(u*(p.width+4)));n.setAttribute("height",Math.ceil(u*(p.height+4)));var v=n.getContext("2d");v.scale(u,u);v.translate(-t,-q);var x=l.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";v.save();v.fillStyle=x;v.fillRect(t,
+null,null,null,null,null,null,l),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var n=document.createElement("canvas"),p=l.getGraphBounds(),t=a/p.width,t=Math.min(1,Math.min(3*a/(4*p.height),t)),u=Math.floor(p.x),q=Math.floor(p.y);n.setAttribute("width",Math.ceil(t*(p.width+4)));n.setAttribute("height",Math.ceil(t*(p.height+4)));var v=n.getContext("2d");v.scale(t,t);v.translate(-u,-q);var x=l.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";v.save();v.fillStyle=x;v.fillRect(u,
q,Math.ceil(p.width+4),Math.ceil(p.height+4));v.restore();var y=new mxJsCanvas(n),A=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var z=new mxImageExport;z.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};z.drawText=function(a,b){};z.drawState(l.getView().getState(l.model.root),A);A.finish(mxUtils.bind(this,function(){try{z.drawState(l.getView().getState(l.model.root),
y),l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}catch(B){n=null}f(n)}));c=!0}}catch(B){c=!1,null!=l&&l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}return c};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
@@ -10488,7 +10491,7 @@ this.createRealtimeNotice();c.style.left="0";c.style.right="0";c.style.borderRad
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("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(){var a=this;window.onerror=function(b,c,d,e,k){EditorUi.logError("Uncaught: "+(null!=b?b:""),c,d,e,k,null,!0);a.handleError({message:b},mxResources.get("unknownError"),null,null,null,null,!0)};null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(a){var b=this.getCurrentFile();
-EditorUi.debug("storage event",a,b);null!=b&&".draft-alive-check"==a.key&&null!=a.newValue&&null!=b.draftId&&(this.draftAliveCheck=a.newValue,b.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/.*\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(f){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();var b=this.getDiagramId(),
+EditorUi.debug("storage event",a,b);null!=b&&".draft-alive-check"==a.key&&null!=a.newValue&&null!=b.draftId&&(this.draftAliveCheck=a.newValue,b.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(f){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();var b=this.getDiagramId(),
c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(g){null!=document.body&&this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var e=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){}c?this.spinner.spin(document.body,
@@ -10505,7 +10508,7 @@ null!=b&&b()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<
this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};
App.prototype.showSplash=function(a){var e=this.getServiceCount(!0,!0),c=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,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);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||mxClient.IS_ANDROID||
mxClient.IS_IOS||this.mode!=App.MODE_DEVICE&&this.mode!=App.MODE_BROWSER||this.showDownloadDesktopBanner()});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!a)null==urlParams.create&&c();else{a=4==e?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();c()}),a);this.showDialog(b.container,3>a?
-240:300,4<=e?440:this.isOfflineApp()?300:320,!0,!1);b.init()}};
+260:320,4<=e?440:this.isOfflineApp()?300:320,!0,!1);b.init()}};
App.prototype.addLanguageMenu=function(a,e){var c=null;if(null!=this.menus.get("language")){c=document.createElement("div");c.setAttribute("title",mxResources.get("language"));c.className="geIcon geSprite geSprite-globe";c.style.position="absolute";c.style.cursor="pointer";c.style.bottom="20px";c.style.right="20px";if(e){c.style.direction="rtl";c.style.textAlign="right";c.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";b.style.userSelect="none";mxUtils.write(b,mxResources.get("language"));c.appendChild(b)}mxEvent.addListener(c,"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(c);
b.popup(e.x,e.y+c.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(c)}return c};
@@ -10539,20 +10542,20 @@ App.prototype.createFile=function(a,e,c,b,k,f,l,d,g){b=d?null:null!=b?b:this.mod
this.drive.insertFile(a,e,l,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n);else if(b==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n,!1,l);else if(b==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n,!1,l);else if(b==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,
c,f,k,g)}),n,!1,l);else if(b==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n);else if(b==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n,!1,l);else if(b==App.MODE_BROWSER){m();var p=mxUtils.bind(this,function(){var b=new StorageFile(this,e,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,c,f,k,g)}),n)});null==localStorage.getItem(a)?
p():this.confirm(mxResources.get("replaceIt",[a]),p,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else!d&&b==App.MODE_DEVICE&&"chooseFileSystemEntries"in window?(m(),this.chooseFileSystemEntries(mxUtils.bind(this,function(a,b){var d=new LocalFile(this,e,b.name,null,a,b);d.saveFile(b.name,!1,mxUtils.bind(this,function(){this.fileCreated(d,c,f,k,g)}),n,!0)}),mxUtils.bind(this,function(a){"AbortError"!=a.name&&n(a)}),this.createFileSystemOptions(a))):
-(m(),this.fileCreated(new LocalFile(this,e,a,null==b),c,f,k,g))}catch(u){m(),this.handleError(u)}}};
+(m(),this.fileCreated(new LocalFile(this,e,a,null==b),c,f,k,g))}catch(t){m(),this.handleError(t)}}};
App.prototype.fileCreated=function(a,e,c,b,k){var f=window.location.pathname;null!=e&&0<e.length&&(f+="?libs="+e);null!=k&&0<k.length&&(f+="?clibs="+k);f=this.getUrl(f);a.getMode()!=App.MODE_DEVICE&&(f+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var l=a.getData(),l=0<l.length?this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0):null,d=window.location.protocol+"//"+window.location.hostname+f,g=l,m=null;null!=l&&/\.svg$/i.test(a.getTitle())&&
(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container),g=this.decodeNodeIntoGraph(g,m));a.setData(this.createFileData(l,m,a,d));null!=m&&m.container.parentNode.removeChild(m.container);var n=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(){n();var d=this.getCurrentFile();null==c&&null!=d&&(c=!d.isModified()&&null==d.getMode());var g=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);c&&a.addAllSavedStatus();
null!=e&&this.sidebar.showEntries(e);if(null!=k){for(var b=[],d=k.split(";"),f=0;f<d.length;f++)b.push(decodeURIComponent(d[f]));this.loadLibraries(b)}}),l=mxUtils.bind(this,function(){c||null==d||!d.isModified()?g():this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==c||c?l():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
null==a.getMode())),null!=b&&b(),window.openWindow(f,null,l))});a.constructor==LocalFile?p():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){p()}),mxUtils.bind(this,function(a){n();this.handleError(a)}))}};
App.prototype.loadFile=function(a,e,c,b,k){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){var d=mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))});a=decodeURIComponent(a.substring(1));
StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null!=c?(this.fileLoaded(new StorageFile(this,c,a)),null!=b&&b()):d({message:mxResources.get("fileNotFound")})}),d)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=c)this.spinner.stop(),this.fileLoaded(c),null!=b&&b();else if("S"==a.charAt(0)){this.spinner.stop();
-try{this.loadDescriptor(JSON.parse(Graph.decompress(a.substring(1))),b,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0)){this.spinner.stop();var f=decodeURIComponent(a.substring(1));"<"!=f.charAt(0)&&(f=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);
+try{this.loadDescriptor(JSON.parse(Graph.decompress(a.substring(1))),b,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0)){this.spinner.stop();var f=decodeURIComponent(a.substring(1));"<"!=f.charAt(0)&&(f=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)),l=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var a=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var a=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+a,e,null,mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&this.editor.chromeless&&!this.editor.editable&&
(c.getHash=function(){return"G"+a},window.location.hash="#"+c.getHash());null!=b&&b()}));return!0}return!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(k,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var d=k,e=k.lastIndexOf("."),f=d.lastIndexOf("/");e>f&&0<f&&(d=d.substring(f+1,e),e=k.substring(e),this.useCanvasForExport||
".png"!=e||(e=".drawio"),".svg"===e||".xml"===e||".html"===e||".png"===e||".drawio"===e)&&(c=d+e)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b,!0)||l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){l()||(this.spinner.stop(),
this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(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:"A"==a.charAt(0)?f=this.gitLab:"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():""}));else{var u=a.charAt(0);a=decodeURIComponent(a.substring(1));f.getFile(a,mxUtils.bind(this,function(c){this.spinner.stop();this.fileLoaded(c);var d=this.getCurrentFile();null==d?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(d.getHash=function(){return u+a},window.location.hash="#"+d.getHash()):c==d&&null==c.getMode()&&(c=mxResources.get("copyCreated"),
-this.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+"</div>"));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()}),null,null,"#"+u+a)}))}}),l=this.getCurrentFile(),d=mxUtils.bind(this,
+mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else{var t=a.charAt(0);a=decodeURIComponent(a.substring(1));f.getFile(a,mxUtils.bind(this,function(c){this.spinner.stop();this.fileLoaded(c);var d=this.getCurrentFile();null==d?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(d.getHash=function(){return t+a},window.location.hash="#"+d.getHash()):c==d&&null==c.getMode()&&(c=mxResources.get("copyCreated"),
+this.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+"</div>"));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()}),null,null,"#"+t+a)}))}}),l=this.getCurrentFile(),d=mxUtils.bind(this,
function(){k||null==l||!l.isModified()?f():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=l&&(window.location.hash=l.getHash())}),f,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?d():null==l||e?d():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+a,null,d)).container,320,140,!0,!0)};
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(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
@@ -10577,10 +10580,10 @@ App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=
window.location.hash=a:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null!=this.format&&this.editor.graph.isSelectionEmpty()&&this.format.refresh()};
App.prototype.showAuthDialog=function(a,e,c,b){var k=this.spinner.pause();this.showDialog((new AuthDialog(this,a,e,mxUtils.bind(this,function(a){try{null!=c&&c(a,mxUtils.bind(this,function(){this.hideDialog();k()}))}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,c,b,k,f,l,d){var g=e;/\.svg$/i.test(g)||(g=g.substring(0,e.lastIndexOf("."))+b);var m=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);m||(n.responseType="blob");if(d)for(var p in d)n.setRequestHeader(p,d[p]);n.onload=mxUtils.bind(this,function(){if(200<=
-n.status&&299>=n.status){var a=null;m?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){k(new LocalFile(this,a,g,!0))}),f,e)}else null!=f&&f({message:mxResources.get("errorLoadingFile")})});n.onerror=f;n.send()}else{var u=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(e)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&k(new LocalFile(this,
+n.status&&299>=n.status){var a=null;m?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){k(new LocalFile(this,a,g,!0))}),f,e)}else null!=f&&f({message:mxResources.get("errorLoadingFile")})});n.onerror=f;n.send()}else{var t=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(e)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&k(new LocalFile(this,
c,g,!0))}else/\.png$/i.test(e)?(c=this.extractGraphModelFromPng(b),null!=c?k(new LocalFile(this,c,g,!0)):k(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?k(new LocalFile(this,a.responseText,g,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),e):k(new LocalFile(this,b,g,!0))}catch(v){null!=
-f&&f(v)}});c=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||/\.pdf$/i.test(e)||null!=c&&"image/"==c.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=k){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(e)?"data:image/png;base64,"+b:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));u(b)}}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})},d):null!=l?l(a,u,f,c):this.editor.loadUrl(a,u,f,c,null,null,null,d)}};
+f&&f(v)}});c=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||/\.pdf$/i.test(e)||null!=c&&"image/"==c.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=k){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(e)?"data:image/png;base64,"+b:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));t(b)}}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})},d):null!=l?l(a,t,f,c):this.editor.loadUrl(a,t,f,c,null,null,null,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="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjI1IDIyNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjI1IDIyNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MXtmaWxsOiNERjZDMEM7fQoJLnN0MntmaWxsOiNGRkZGRkY7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjI1LDIxNS40YzAsNS4zLTQuMyw5LjYtOS41LDkuNmwwLDBINzcuMWwtNDQuOC00NS41TDYwLjIsMTM0bDgyLjctMTAyLjdsODIuMSw4NC41VjIxNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTg0LjYsMTI1LjhoLTIzLjdsLTI1LTQyLjdjNS43LTEuMiw5LjgtNi4yLDkuNy0xMlYzOWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNoLTAuMUg5MS42CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMlYzOXYzMi4xYzAsNS44LDQsMTAuOCw5LjcsMTJsLTI1LDQyLjdINDAuNGMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xCgljMCw2LjgsNS40LDEyLjMsMTIuMiwxMi4zaDAuMWg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMnYtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM2gtMC4xaC00bDI0LjgtNDIuNGgxOS4zCglsMjQuOSw0Mi40SDE0M2MtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2gwLjFoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJ2LTAuMXYtMzIuMQoJYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM0MxODQuNywxMjUuOCwxODQuNywxMjUuOCwxODQuNiwxMjUuOHoiLz4KPC9zdmc+Cg==)":
@@ -10642,20 +10645,20 @@ k.getSelectionCount()){var a=k.getSelectionCell(),c=k.view.getState(a);null!=c&&
640,480,!0,!0);d.init()}),mxUtils.bind(this,function(a){b.handleError(a)})):b.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});b.actions.addAction("createRevision",function(){b.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");n=b.actions.addAction("synchronize",function(){b.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(n.label=mxResources.get("refresh"));b.actions.addAction("upload...",function(){var a=
b.getCurrentFile();null!=a&&(window.drawdata=b.getFileData(),a=null!=a.getTitle()?a.getTitle():b.defaultFilename,b.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(b.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(a),null,!0))});"undefined"!==typeof MathJax&&(n=b.actions.addAction("mathematicalTypesetting",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.mathEnabled=!b.isMathEnabled();k.model.execute(a)}),n.setToggleAction(!0),
n.setSelectedCallback(function(){return b.isMathEnabled()}),n.isEnabled=f);if(isLocalStorage||mxClient.IS_CHROMEAPP)n=b.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),n.setToggleAction(!0),n.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var p=b.actions.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&
-b.editor.autosave});b.actions.addAction("editGeometry...",function(){for(var a=k.getSelectionCells(),c=[],d=0;d<a.length;d++)k.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,250,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var u=null;b.actions.addAction("copyStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&(u=k.copyStyle(k.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){k.isEnabled()&&
-!k.isSelectionEmpty()&&null!=u&&k.pasteStyle(u,k.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,320,170,!0,!0);a.init()}}));b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),
+b.editor.autosave});b.actions.addAction("editGeometry...",function(){for(var a=k.getSelectionCells(),c=[],d=0;d<a.length;d++)k.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,250,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;b.actions.addAction("copyStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&(t=k.copyStyle(k.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){k.isEnabled()&&
+!k.isSelectionEmpty()&&null!=t&&k.pasteStyle(t,k.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,320,170,!0,!0);a.init()}}));b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),
"https://desk.draw.io/support/solutions/articles/16000067785",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,p,v){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!l,m,n,v)}),!0,null,"svg")}));b.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://desk.draw.io/support/solutions/articles/16000067785",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,p,v){a=parseInt(a);
!isNaN(a)&&0<a&&b.exportImage(a/100,c,d,e,f,k,!l,m,null,p,null,v)}),!0,!0,"png"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://desk.draw.io/support/solutions/articles/16000067785",
mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,p,v){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,d,e,!1,k,!l,!1,"jpeg",p,null,v)}),!0,!1,"jpeg"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile("jpeg",null,null,a,null,null,null,e,f)}),!0,!0)}));n=b.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));n.setToggleAction(!0);
n.setSelectedCallback(function(){return k.shadowVisible});b.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.alert(b.editor.appName+" "+EditorUi.VERSION):b.openLink("https://www.diagrams.net/")}));b.actions.addAction("support...",function(){b.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});b.actions.addAction("exportOptionsDisabled...",function(){b.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
-mxResources.get("exportOptionsDisabled"))});b.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?b.openLink("shortcuts.svg"):b.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});b.actions.addAction("feedback...",function(){var a=new FeedbackDialog(b);b.showDialog(a.container,610,360,!0,!1);a.init()});b.actions.addAction("quickStart...",function(){b.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});
+mxResources.get("exportOptionsDisabled"))});b.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):b.openLink("shortcuts.svg")});b.actions.addAction("feedback...",function(){var a=new FeedbackDialog(b);b.showDialog(a.container,610,360,!0,!1);a.init()});b.actions.addAction("quickStart...",function(){b.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});
n=b.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(b,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));n.setToggleAction(!0);
n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));n=b.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(b,document.body.offsetWidth-300,110,240,155),this.findWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),
b.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));b.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){b.exportVisio()}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&b.actions.addAction("configuration...",function(){var a=localStorage.getItem(".configuration"),
a=new TextareaDialog(b,mxResources.get("configuration")+":",null!=a?JSON.stringify(JSON.parse(a),null,2):"",function(a){if(null!=a)try{if(0<a.length){var c=JSON.parse(a);localStorage.setItem(".configuration",JSON.stringify(c))}else localStorage.removeItem(".configuration");b.hideDialog();b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}},null,null,null,null,null,!0,null,null,"https://desk.draw.io/support/solutions/articles/16000058316",EditorUi.isElectronApp?null:[[mxResources.get("reset"),
function(a,c){b.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(".configuration"),localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode"),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}})}],[mxResources.get("link"),function(a,c){if(0<c.value.length)try{var d=JSON.parse(c.value),e=window.location.protocol+"//"+window.location.host+"/"+b.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(d)),f=new EmbedDialog(b,
e);b.showDialog(f.container,440,240,!0);f.init()}catch(I){b.handleError(I)}else b.handleError({message:mxResources.get("invalidInput")})}]]);a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!1);a.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(a,c){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);b.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&a.addCheckmark(f,Editor.checkmarkImage));return f});d("");a.addSeparator(c);for(var e in mxLanguageMap)d(e)})));var t=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=t.apply(this,arguments);if(null!=b){var c=this.get("language");if(null!=
+function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);b.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&a.addCheckmark(f,Editor.checkmarkImage));return f});d("");a.addSeparator(c);for(var e in mxLanguageMap)d(e)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");if(null!=
c){c=b.addMenu("",c.funct);c.setAttribute("title",mxResources.get("language"));c.style.width="16px";c.style.paddingTop="2px";c.style.paddingLeft="4px";c.style.zIndex="1";c.style.position="absolute";c.style.display="block";c.style.cursor="pointer";c.style.right="17px";"atlas"==uiTheme?(c.style.top="6px",c.style.right="15px"):c.style.top="min"==uiTheme?"2px":"0px";if(mxClient.IS_VML)c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>';else{var d=document.createElement("div");d.style.backgroundImage=
"url("+Editor.globeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="19px 19px";d.style.position="absolute";d.style.height="19px";d.style.width="19px";d.style.marginTop="2px";d.style.zIndex="1";c.appendChild(d);mxUtils.setOpacity(c,40);if("atlas"==uiTheme||"dark"==uiTheme)c.style.opacity="0.85",c.style.filter="invert(100%)"}document.body.appendChild(c)}}return b}}b.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",
intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];b.actions.addAction("runLayout",function(){var a=new TextareaDialog(b,"Run Layouts:",JSON.stringify(b.customLayoutConfig,null,2),function(a){if(0<a.length)try{var c=JSON.parse(a);b.executeLayoutList(c);b.customLayoutConfig=c}catch(D){b.handleError(D),null!=window.console&&console.error(D)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()});
@@ -10670,8 +10673,8 @@ urlParams.test&&(a.addSeparator(c),this.addSubmenu("testDevelop",a,c))})));"1"==
mxResources.parse("testImportRtModel=Import RT model"),b.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!k.isSelectionEmpty()){var a=k.cloneCells(k.getSelectionCells()),c=k.getBoundingBoxFromGeometry(a),a=k.moveCells(a,-c.x,-c.y);b.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+c.width+", "+c.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(a)))+"'),")}})),b.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=
k.getGraphBounds(),b=k.view.translate,c=k.view.scale;k.insertVertex(k.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),b.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var a=null!=b.pages&&null!=b.getCurrentFile()?b.getCurrentFile().getAnonymizedXmlForPages(b.pages):"",a=new TextareaDialog(b,"Paste Data:",a,function(a){if(0<a.length)try{var c=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=
e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var l=d[k];if(null!=l.id&&0<l.id.length)if(null==a[l.id]){a[l.id]=l.id;var m=l.getAttribute("parent");null==m?null!=f?mxLog.debug(c+": Multiple roots: "+l.id):f=l.id:(null==e[m]&&(e[m]=[]),e[m].push(l.id))}else g[l.id]=l.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):
-mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(G){mxLog.debug("Error: ",
-G.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(G){b.handleError(G),null!=window.console&&console.error(G)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,
+mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(H){mxLog.debug("Error: ",
+H.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(H){b.handleError(H),null!=window.console&&console.error(H)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,
b.getPagesForNode(mxUtils.parseXml(a).documentElement)),null,2))}catch(C){b.handleError(C),null!=window.console&&console.error(C)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()}else b.alert("No pages")})),b.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(b,k.getModel())})),b.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=k.getGraphBounds(),c=k.view.scale,d=mxUtils.createXmlDocument(),
e=d.createElement("output");d.appendChild(e);d=new mxXmlCanvas2D(e);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var f=0,g=d.save;d.save=function(){f++;g.apply(this,arguments)};var l=d.restore;d.restore=function(){f--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);m.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(k.getView().getState(k.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",
f)})),b.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==b.drive?b.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):b.drive.execute(mxUtils.bind(this,function(){var a=prompt("File ID","");if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+a+"/realtime?supportsAllDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,
@@ -10822,31 +10825,31 @@ var f=q.model.getParent(a),g=f.geometry,k=[];q.view.currentRoot!=f&&(e[1].geomet
q.model.getParent(a),e=q.getIncomingEdges(a),f=d(a);0==e.length&&(e=[q.createEdge(c,null,"",null,null,q.createCurrentEdgeStyle())],f=b);var g=q.cloneCells([e[0],a]);q.model.setTerminal(g[0],a,!0);if(null==q.model.getTerminal(g[0],!1)){q.model.setTerminal(g[0],g[1],!1);var k=q.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)q.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&q.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?
"vertical":"horizontal",[g[0]])}catch(P){}}var e=q.getOutgoingEdges(a),n=c.geometry,k=[];q.view.currentRoot==c&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=q.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var v=q.view.getBounds(k),t=q.view.translate,u=q.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==v?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(v.x+v.width)/u-t.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
null==v?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(v.x+v.width)/u-t.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==v?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(v.y+v.height)/u-t.y+-n.y+10);return q.addCells(g,c)}finally{q.model.endUpdate()}}function p(a,b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=d(a),e=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==e&&c!=b?t.actions.get("selectParent").funct():
-c==b?(e=q.getOutgoingEdges(a),null!=e&&0<e.length&&q.setSelectionCell(q.model.getTerminal(e[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(e=p(q.model.getTerminal(c[0],!0),e,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(e,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=e.length-1&&q.setSelectionCell(e[c].cell)))))}var t=this,q=t.editor.graph,v=q.getModel(),x=t.menus.createPopupMenu;t.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
-if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(q.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(q.getSelectionCell())&&(b.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};t.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);
-if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",
-function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+D");var y=q.removeCells;q.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&e(g)&&(d.push(g),g=v.getTerminal(g,!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=q.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return y.apply(this,arguments)};t.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
+[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function t(a,b){var c=d(a),e=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==e&&c!=b?u.actions.get("selectParent").funct():
+c==b?(e=q.getOutgoingEdges(a),null!=e&&0<e.length&&q.setSelectionCell(q.model.getTerminal(e[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(e=p(q.model.getTerminal(c[0],!0),e,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(e,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=e.length-1&&q.setSelectionCell(e[c].cell)))))}var u=this,q=u.editor.graph,v=q.getModel(),x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
+if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(q.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(q.getSelectionCell())&&(b.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};u.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);
+if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",
+function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+D");var y=q.removeCells;q.removeCells=function(b,c){c=null!=
+c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&e(g)&&(d.push(g),g=v.getTerminal(g,!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=q.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return y.apply(this,arguments)};u.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
d))};var A=q.duplicateCells;q.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=A.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||q.model.isEdge(b[p])&&null==q.model.getTerminal(b[p],!0)){f=q.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var v=q.getIncomingEdges(b[0]);
if(0<v.length){var t=q.view.getState(q.model.getTerminal(v[0],!0));if(null!=t){var u=q.view.getState(m);null!=u&&(c=(u.getCenterX()-t.getCenterX())/q.view.scale,d=(u.getCenterY()-t.getCenterY())/q.view.scale)}}}}l=z.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(v=q.getIncomingEdges(b[p]),0<v.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
-this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],m,!0);else if(0==q.getIncomingEdges(l[p]).length){n=m;if(null==n||n==q.model.getParent(b[p]))n=q.model.getTerminal(v[0],!0);e=this.cloneCell(v[0]);this.addEdge(e,q.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var B=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
-null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},D=t.onKeyDown;t.onKeyDown=function(b){try{if(q.isEnabled()&&!q.isEditing()&&a(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&
-(9==b.which?c=mxEvent.isShiftDown(b)?m(q.getSelectionCell()):n(q.getSelectionCell()):13==b.which&&(c=g(q.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=C[b.keyCode];
-null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(u(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(J){t.handleError(J)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var E=q.connectVertex;q.connectVertex=
+this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],m,!0);else if(0==q.getIncomingEdges(l[p]).length){n=m;if(null==n||n==q.model.getParent(b[p]))n=q.model.getTerminal(v[0],!0);e=this.cloneCell(v[0]);this.addEdge(e,q.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var B=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
+null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},D=u.onKeyDown;u.onKeyDown=function(b){try{if(q.isEnabled()&&!q.isEditing()&&a(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&
+(9==b.which?c=mxEvent.isShiftDown(b)?m(q.getSelectionCell()):n(q.getSelectionCell()):13==b.which&&(c=g(q.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=C[b.keyCode];
+null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(t(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(J){u.handleError(J)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var E=q.connectVertex;q.connectVertex=
function(b,c,e,f,k,l,p){var v=q.getIncomingEdges(b);if(a(b)){var t=d(b),u=t==mxConstants.DIRECTION_EAST||t==mxConstants.DIRECTION_WEST,z=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;return t==c||0==v.length?n(b,c):u==z?m(b):g(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)}return E.apply(this,arguments)};q.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||l(b)||q.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
return!0});return d};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!l(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
-this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;t.hoverIcons.reset();mxEvent.consume(a)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
-function(){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var G=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(a)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+function(){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};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),e=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=
!0;var b=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);c.insertEdge(e,!1);a.insert(e);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;
b.insertEdge(e,!0);c.insertEdge(e,!1);var k=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);k.insertEdge(n,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);p.insertEdge(u,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');t.vertex=!0;var q=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);t.insertEdge(q,!1);a.insert(e);a.insert(n);a.insert(u);a.insert(q);a.insert(b);a.insert(c);a.insert(k);a.insert(p);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);k.insertEdge(n,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');p.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);p.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]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');u.vertex=!0;var q=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);u.insertEdge(q,!1);a.insert(e);a.insert(n);a.insert(t);a.insert(q);a.insert(b);a.insert(c);a.insert(k);a.insert(p);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;html=1;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -10881,8 +10884,8 @@ a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUt
"lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?
this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var p=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);p.apply(this,arguments)};var u=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){u.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(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 b=this.editorUi,c=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
+this.menus.findWindow=null);p.apply(this,arguments)};var t=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){t.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(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 b=this.editorUi,c=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
function(){c.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
function(){e(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,mxResources.get("plantUml")+"...","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(b,mxResources.get("mermaid")+"...","mermaid");
b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,
@@ -10911,30 +10914,30 @@ null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.i
null!=urlParams.libs)&&e(this,!0);1E3<=c&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.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 p=null,t=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var u=l.descriptorChanged;l.descriptorChanged=function(){u.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer=
-l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,G=document.createElement("div");G.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
-l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var H=t.addMenu("100%",K.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.backgroundColor="#ffffff";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.visibility="hidden";H.style.textAlign="center";H.style.color="#000";H.style.fontSize="12px";H.style.color="#707070";H.style.width="59px";H.style.cursor="pointer";H.style.borderTop="1px solid lightgray";H.style.borderLeft="1px solid lightgray";H.style.height=parseInt(l.tabContainerHeight)-1+"px";H.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";G.appendChild(H);K=mxUtils.bind(this,function(){H.innerHTML=Math.round(100*
-l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(H.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}G.appendChild(l.tabContainer);G.appendChild(n);G.appendChild(l.diagramContainer);
-k.appendChild(G);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,l){var d=c.y,f=c.x,k=!1,n=!1;if(null!=this.states&&null!=b&&null!=c){var p=this,u=new mxCellState,t=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);u.x=b.x+f;u.y=b.y+d;u.width=b.width;u.height=b.height;for(var v=[],x=[],y=0;y<this.states.length;y++){var A=this.states[y];A instanceof mxCellState&&(l||!this.graph.isCellSelected(A.cell))&&((u.x>=A.x&&u.x<=A.x+A.width||A.x>=u.x&&A.x<=u.x+u.width)&&(u.y>
-A.y+A.height+4||u.y+u.height+4<A.y)?v.push(A):(u.y>=A.y&&u.y<=A.y+A.height||A.y>=u.y&&A.y<=u.y+u.height)&&(u.x>A.x+A.width+4||u.x+u.width+4<A.x)&&x.push(A))}var z=0,B=0,C=A=0,D=0,E=0,F=0,I=0,G=5*t;if(1<v.length){v.push(u);v.sort(function(a,b){return a.y-b.y});var K=!1,y=u==v[0],t=u==v[v.length-1];if(!y&&!t)for(y=1;y<v.length-1;y++)if(u==v[y]){t=v[y-1];y=v[y+1];A=B=C=(y.y-t.y-t.height-u.height)/2;break}for(y=0;y<v.length-1;y++){var t=v[y],H=v[y+1],L=u==t||u==H,H=H.y-t.y-t.height,K=K|u==t;if(0==B&&
-0==z)B=H,z=1;else if(Math.abs(B-H)<=(L||1==y&&K?q:0))z+=1;else if(1<z&&K){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!K)z=0,A=B=0!=C?C:0,v.splice(0,0==y?1:y),y=-1;else break;0!=A||L||(B=A=H)}3==v.length&&v[1]==u&&(A=0)}if(1<x.length){x.push(u);x.sort(function(a,b){return a.x-b.x});K=!1;y=u==x[0];t=u==x[x.length-1];if(!y&&!t)for(y=1;y<x.length-1;y++)if(u==x[y]){t=x[y-1];y=x[y+1];F=E=I=(y.x-t.x-t.width-u.width)/2;break}for(y=0;y<x.length-1;y++){t=x[y];H=x[y+1];L=u==t||u==H;H=H.x-t.x-t.width;K|=u==
-t;if(0==E&&0==D)E=H,D=1;else if(Math.abs(E-H)<=(L||1==y&&K?q:0))D+=1;else if(1<D&&K){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!K)D=0,F=E=0!=I?I:0,x.splice(0,0==y?1:y),y=-1;else break;0!=F||L||(E=F=H)}3==x.length&&x[1]==u&&(F=0)}q=function(a,b,c,d){var e=[],f;d?(d=G,f=0):(d=0,f=G);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};E=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==x.length-1){D=[];I=p.guidesArrHor;k=[];f=0;y=x[0]==u?1:0;K=x[y].y+x[y].height;if(0<F)for(y=0;y<x.length-1;y++)t=
-x[y],H=x[y+1],u==t?(f=H.x-t.width-F,k.push(new mxPoint(f+t.width+G,K)),k.push(new mxPoint(H.x-G,K))):u==H?(k.push(new mxPoint(t.x+t.width+G,K)),f=t.x+t.width+F,k.push(new mxPoint(f-G,K))):(k.push(new mxPoint(t.x+t.width+G,K)),k.push(new mxPoint(H.x-G,K)));else t=x[0],y=x[2],f=t.x+t.width+(y.x-t.x-t.width-u.width)/2,k.push(new mxPoint(t.x+t.width+G,K)),k.push(new mxPoint(f-G,K)),k.push(new mxPoint(f+u.width+G,K)),k.push(new mxPoint(y.x-G,K));for(y=0;y<k.length;y+=2)x=k[y],F=k[y+1],x=q(x,F,null!=I?
-I[y/2]:null),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=k.length/2;null!=I&&y<I.length;y++)I[y].destroy();p.guidesArrHor=D;f-=b.x;k=!0}else E(!0);if(1<z&&z==v.length-1){D=[];I=p.guidesArrVer;n=[];d=0;y=v[0]==u?1:0;z=v[y].x+v[y].width;if(0<A)for(y=0;y<v.length-1;y++)t=v[y],H=v[y+1],u==t?(d=H.y-t.height-A,n.push(new mxPoint(z,d+t.height+G)),n.push(new mxPoint(z,H.y-G))):u==H?(n.push(new mxPoint(z,t.y+t.height+G)),d=t.y+t.height+A,n.push(new mxPoint(z,d-G))):(n.push(new mxPoint(z,t.y+
-t.height+G)),n.push(new mxPoint(z,H.y-G)));else t=v[0],y=v[2],d=t.y+t.height+(y.y-t.y-t.height-u.height)/2,n.push(new mxPoint(z,t.y+t.height+G)),n.push(new mxPoint(z,d-G)),n.push(new mxPoint(z,d+u.height+G)),n.push(new mxPoint(z,y.y-G));for(y=0;y<n.length;y+=2)x=n[y],F=n[y+1],x=q(x,F,null!=I?I[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=n.length/2;null!=I&&y<I.length;y++)I[y].destroy();p.guidesArrVer=D;d-=b.y;n=!0}else E(!1,!0)}if(k||n)return u=new mxPoint(f,d),v=a.call(this,
-b,u,e,l),k&&!n?u.y=v.y:n&&!k&&(u.x=v.x),v.y!=u.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=u.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),u;E(!0,!0);return a.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){e.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var l=0;l<b.length;l++)b[l].node.style.visibility=a?"visible":"hidden";if(null!=
+l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,H=document.createElement("div");H.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
+l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var G=t.addMenu("100%",K.funct);G.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");G.style.whiteSpace="nowrap";G.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";G.style.backgroundPosition="right 6px center";G.style.backgroundRepeat="no-repeat";G.style.backgroundColor="#ffffff";G.style.paddingRight="10px";G.style.display="block";G.style.position="absolute";G.style.textDecoration="none";G.style.textDecoration=
+"none";G.style.right="0px";G.style.bottom="0px";G.style.overflow="hidden";G.style.visibility="hidden";G.style.textAlign="center";G.style.color="#000";G.style.fontSize="12px";G.style.color="#707070";G.style.width="59px";G.style.cursor="pointer";G.style.borderTop="1px solid lightgray";G.style.borderLeft="1px solid lightgray";G.style.height=parseInt(l.tabContainerHeight)-1+"px";G.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";H.appendChild(G);K=mxUtils.bind(this,function(){G.innerHTML=Math.round(100*
+l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(G.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}H.appendChild(l.tabContainer);H.appendChild(n);H.appendChild(l.diagramContainer);
+k.appendChild(H);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,l){var d=c.y,f=c.x,k=!1,n=!1;if(null!=this.states&&null!=b&&null!=c){var p=this,t=new mxCellState,u=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);t.x=b.x+f;t.y=b.y+d;t.width=b.width;t.height=b.height;for(var v=[],x=[],y=0;y<this.states.length;y++){var A=this.states[y];A instanceof mxCellState&&(l||!this.graph.isCellSelected(A.cell))&&((t.x>=A.x&&t.x<=A.x+A.width||A.x>=t.x&&A.x<=t.x+t.width)&&(t.y>
+A.y+A.height+4||t.y+t.height+4<A.y)?v.push(A):(t.y>=A.y&&t.y<=A.y+A.height||A.y>=t.y&&A.y<=t.y+t.height)&&(t.x>A.x+A.width+4||t.x+t.width+4<A.x)&&x.push(A))}var z=0,B=0,C=A=0,D=0,E=0,F=0,I=0,H=5*u;if(1<v.length){v.push(t);v.sort(function(a,b){return a.y-b.y});var K=!1,y=t==v[0],u=t==v[v.length-1];if(!y&&!u)for(y=1;y<v.length-1;y++)if(t==v[y]){u=v[y-1];y=v[y+1];A=B=C=(y.y-u.y-u.height-t.height)/2;break}for(y=0;y<v.length-1;y++){var u=v[y],G=v[y+1],L=t==u||t==G,G=G.y-u.y-u.height,K=K|t==u;if(0==B&&
+0==z)B=G,z=1;else if(Math.abs(B-G)<=(L||1==y&&K?q:0))z+=1;else if(1<z&&K){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!K)z=0,A=B=0!=C?C:0,v.splice(0,0==y?1:y),y=-1;else break;0!=A||L||(B=A=G)}3==v.length&&v[1]==t&&(A=0)}if(1<x.length){x.push(t);x.sort(function(a,b){return a.x-b.x});K=!1;y=t==x[0];u=t==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(t==x[y]){u=x[y-1];y=x[y+1];F=E=I=(y.x-u.x-u.width-t.width)/2;break}for(y=0;y<x.length-1;y++){u=x[y];G=x[y+1];L=t==u||t==G;G=G.x-u.x-u.width;K|=t==
+u;if(0==E&&0==D)E=G,D=1;else if(Math.abs(E-G)<=(L||1==y&&K?q:0))D+=1;else if(1<D&&K){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!K)D=0,F=E=0!=I?I:0,x.splice(0,0==y?1:y),y=-1;else break;0!=F||L||(E=F=G)}3==x.length&&x[1]==t&&(F=0)}q=function(a,b,c,d){var e=[],f;d?(d=H,f=0):(d=0,f=H);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};E=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==x.length-1){D=[];I=p.guidesArrHor;k=[];f=0;y=x[0]==t?1:0;K=x[y].y+x[y].height;if(0<F)for(y=0;y<x.length-1;y++)u=
+x[y],G=x[y+1],t==u?(f=G.x-u.width-F,k.push(new mxPoint(f+u.width+H,K)),k.push(new mxPoint(G.x-H,K))):t==G?(k.push(new mxPoint(u.x+u.width+H,K)),f=u.x+u.width+F,k.push(new mxPoint(f-H,K))):(k.push(new mxPoint(u.x+u.width+H,K)),k.push(new mxPoint(G.x-H,K)));else u=x[0],y=x[2],f=u.x+u.width+(y.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+H,K)),k.push(new mxPoint(f-H,K)),k.push(new mxPoint(f+t.width+H,K)),k.push(new mxPoint(y.x-H,K));for(y=0;y<k.length;y+=2)x=k[y],F=k[y+1],x=q(x,F,null!=I?
+I[y/2]:null),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=k.length/2;null!=I&&y<I.length;y++)I[y].destroy();p.guidesArrHor=D;f-=b.x;k=!0}else E(!0);if(1<z&&z==v.length-1){D=[];I=p.guidesArrVer;n=[];d=0;y=v[0]==t?1:0;z=v[y].x+v[y].width;if(0<A)for(y=0;y<v.length-1;y++)u=v[y],G=v[y+1],t==u?(d=G.y-u.height-A,n.push(new mxPoint(z,d+u.height+H)),n.push(new mxPoint(z,G.y-H))):t==G?(n.push(new mxPoint(z,u.y+u.height+H)),d=u.y+u.height+A,n.push(new mxPoint(z,d-H))):(n.push(new mxPoint(z,u.y+
+u.height+H)),n.push(new mxPoint(z,G.y-H)));else u=v[0],y=v[2],d=u.y+u.height+(y.y-u.y-u.height-t.height)/2,n.push(new mxPoint(z,u.y+u.height+H)),n.push(new mxPoint(z,d-H)),n.push(new mxPoint(z,d+t.height+H)),n.push(new mxPoint(z,y.y-H));for(y=0;y<n.length;y+=2)x=n[y],F=n[y+1],x=q(x,F,null!=I?I[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=n.length/2;null!=I&&y<I.length;y++)I[y].destroy();p.guidesArrVer=D;d-=b.y;n=!0}else E(!1,!0)}if(k||n)return t=new mxPoint(f,d),v=a.call(this,
+b,t,e,l),k&&!n?t.y=v.y:n&&!k&&(t.x=v.x),v.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;E(!0,!0);return a.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){e.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var l=0;l<b.length;l++)b[l].node.style.visibility=a?"visible":"hidden";if(null!=
c)for(l=0;l<c.length;l++)c[l].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,e=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=e){for(f=0;f<e.length;f++)e[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,e,c,b){function k(){var b=a.diagramContainer;m.style.top=b.offsetTop-l+"px";m.style.left=b.offsetLeft-l+"px";m.style.width=(c?0:b.offsetWidth)+l+"px";m.style.height=(c?b.offsetHeight:0)+l+"px"}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var l=this.RULER_THICKNESS,d=this;this.unit=e;var g="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},m=document.createElement("div");m.style.position="absolute";m.style.background=g.bkgClr;m.style[c?"borderRight":"borderBottom"]="0.5px solid "+g.strokeClr;m.style.borderLeft="0.5px solid "+g.strokeClr;document.body.appendChild(m);mxEvent.disableContextMenu(m);this.editorUiRefresh=a.refresh;a.refresh=function(b){d.editorUiRefresh.apply(a,
-arguments);k()};k();var n=document.createElement("canvas");n.width=m.offsetWidth;n.height=m.offsetHeight;m.style.overflow="hidden";n.style.position="relative";m.appendChild(n);var p=n.getContext("2d");this.ui=a;var u=a.editor.graph;this.graph=u;this.container=m;this.canvas=n;var t=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);p.beginPath();p.moveTo(a+.5,b+.5);p.lineTo(d+.5,e+.5);p.stroke();f&&(c?(p.save(),p.translate(a,b),p.rotate(-Math.PI/2),p.fillText(f,0,0),
-p.restore()):p.fillText(f,a,b))},q=function(){p.clearRect(0,0,n.width,n.height);p.beginPath();p.lineWidth=.7;p.strokeStyle=g.strokeClr;p.setLineDash([]);p.font="9px Arial";p.textAlign="center";var a=u.view.scale,b=u.view.getBackgroundPageBounds(),e=u.view.translate,f=u.view.getGraphBounds(),k=u.pageVisible,m=k?l+(c?b.y-u.container.scrollTop:b.x-u.container.scrollLeft):l+(c?e.y-u.container.scrollTop:e.x-u.container.scrollLeft),q=0;k&&(q=c?Math.floor(((f.y+1)/a-e.y)/u.pageFormat.height)*u.pageFormat.height*
-a:Math.floor(((f.x+1)/a-e.x)/u.pageFormat.width)*u.pageFormat.width*a);var D,E,F;switch(d.unit){case mxConstants.POINTS:D=F=10;E=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:F=10;D=mxConstants.PIXELS_PER_MM;E=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:F=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/F,E=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}e=D;2<=a?e=D/(2*Math.floor(a/2)):.5>=a&&(e=D*Math.floor(1/a/2)*(d.unit==mxConstants.MILLIMETERS?2:1));D=null;b=k?Math.min(m+(c?b.height:b.width),
-c?n.height:n.width):c?n.height:n.width;k&&(p.fillStyle=g.outBkgClr,c?(p.fillRect(0,l,l,m-l),p.fillRect(0,b,l,n.height)):(p.fillRect(l,0,m-l,l),p.fillRect(b,0,n.width,l)));p.fillStyle=g.fontClr;for(k=k?m:m%(e*a);k<=b;k+=e*a)if(f=Math.round((k-m)/a/e),!(k<l||f==D)){D=f;var I=null;0==f%F&&(I=d.formatText(q+f*e)+"");c?t(l-E[Math.abs(f)%F],k,l,k,I):t(k,l-E[Math.abs(f)%F],k,l,I)}p.lineWidth=1;t(c?0:l,c?l:0,l,l);p.fillStyle=g.cornerClr;p.fillRect(0,0,l,l)};this.drawRuler=q;this.sizeListener=e=f(function(){var a=
-u.container;c?(a=a.offsetHeight+l,n.height!=a&&(n.height=a,m.style.height=a+"px",q())):(a=a.offsetWidth+l,n.width!=a&&(n.width=a,m.style.width=a+"px",q()))},10);this.pageListener=function(){q()};this.scrollListener=b=f(function(){var a=c?u.container.scrollTop:u.container.scrollLeft;d.lastScroll!=a&&(d.lastScroll=a,q())},10);this.unitListener=function(a,b){d.setUnit(b.getProperty("unit"))};u.addListener(mxEvent.SIZE,e);u.container.addEventListener("scroll",b);u.view.addListener("unitChanged",this.unitListener);
+arguments);k()};k();var n=document.createElement("canvas");n.width=m.offsetWidth;n.height=m.offsetHeight;m.style.overflow="hidden";n.style.position="relative";m.appendChild(n);var p=n.getContext("2d");this.ui=a;var t=a.editor.graph;this.graph=t;this.container=m;this.canvas=n;var u=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);p.beginPath();p.moveTo(a+.5,b+.5);p.lineTo(d+.5,e+.5);p.stroke();f&&(c?(p.save(),p.translate(a,b),p.rotate(-Math.PI/2),p.fillText(f,0,0),
+p.restore()):p.fillText(f,a,b))},q=function(){p.clearRect(0,0,n.width,n.height);p.beginPath();p.lineWidth=.7;p.strokeStyle=g.strokeClr;p.setLineDash([]);p.font="9px Arial";p.textAlign="center";var a=t.view.scale,b=t.view.getBackgroundPageBounds(),e=t.view.translate,f=t.view.getGraphBounds(),k=t.pageVisible,m=k?l+(c?b.y-t.container.scrollTop:b.x-t.container.scrollLeft):l+(c?e.y-t.container.scrollTop:e.x-t.container.scrollLeft),q=0;k&&(q=c?Math.floor(((f.y+1)/a-e.y)/t.pageFormat.height)*t.pageFormat.height*
+a:Math.floor(((f.x+1)/a-e.x)/t.pageFormat.width)*t.pageFormat.width*a);var D,E,F;switch(d.unit){case mxConstants.POINTS:D=F=10;E=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:F=10;D=mxConstants.PIXELS_PER_MM;E=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:F=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/F,E=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}e=D;2<=a?e=D/(2*Math.floor(a/2)):.5>=a&&(e=D*Math.floor(1/a/2)*(d.unit==mxConstants.MILLIMETERS?2:1));D=null;b=k?Math.min(m+(c?b.height:b.width),
+c?n.height:n.width):c?n.height:n.width;k&&(p.fillStyle=g.outBkgClr,c?(p.fillRect(0,l,l,m-l),p.fillRect(0,b,l,n.height)):(p.fillRect(l,0,m-l,l),p.fillRect(b,0,n.width,l)));p.fillStyle=g.fontClr;for(k=k?m:m%(e*a);k<=b;k+=e*a)if(f=Math.round((k-m)/a/e),!(k<l||f==D)){D=f;var I=null;0==f%F&&(I=d.formatText(q+f*e)+"");c?u(l-E[Math.abs(f)%F],k,l,k,I):u(k,l-E[Math.abs(f)%F],k,l,I)}p.lineWidth=1;u(c?0:l,c?l:0,l,l);p.fillStyle=g.cornerClr;p.fillRect(0,0,l,l)};this.drawRuler=q;this.sizeListener=e=f(function(){var a=
+t.container;c?(a=a.offsetHeight+l,n.height!=a&&(n.height=a,m.style.height=a+"px",q())):(a=a.offsetWidth+l,n.width!=a&&(n.width=a,m.style.width=a+"px",q()))},10);this.pageListener=function(){q()};this.scrollListener=b=f(function(){var a=c?t.container.scrollTop:t.container.scrollLeft;d.lastScroll!=a&&(d.lastScroll=a,q())},10);this.unitListener=function(a,b){d.setUnit(b.getProperty("unit"))};t.addListener(mxEvent.SIZE,e);t.container.addEventListener("scroll",b);t.view.addListener("unitChanged",this.unitListener);
a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){g=a;m.style.background=g.bkgClr;q()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,e,f){var k;if(c&&4<a.height||!c&&4<a.width){if(null!=d.guidePart)try{p.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),p.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),p.putImageData(d.guidePart.imgData3,
-d.guidePart.x3,d.guidePart.y3)}catch(L){}k=d.origGuideMove.apply(this,arguments);try{var m,n,q,u,v,y,x,A,H;p.lineWidth=.5;p.strokeStyle=g.guideClr;p.setLineDash([2]);c?(n=a.y+k.y+l-this.graph.container.scrollTop,m=0,v=n+a.height/2,u=l/2,A=n+a.height,x=0,q=p.getImageData(m,n-1,l,3),t(m,n,l,n),n--,y=p.getImageData(u,v-1,l,3),t(u,v,l,v),v--,H=p.getImageData(x,A-1,l,3),t(x,A,l,A),A--):(n=0,m=a.x+k.x+l-this.graph.container.scrollLeft,v=l/2,u=m+a.width/2,A=0,x=m+a.width,q=p.getImageData(m-1,n,3,l),t(m,
-n,m,l),m--,y=p.getImageData(u-1,v,3,l),t(u,v,u,l),u--,H=p.getImageData(x-1,A,3,l),t(x,A,x,l),x--);if(null==d.guidePart||d.guidePart.x1!=m||d.guidePart.y1!=n)d.guidePart={imgData1:q,x1:m,y1:n,imgData2:y,x2:u,y2:v,imgData3:H,x3:x,y3:A}}catch(L){}}else k=d.origGuideMove.apply(this,arguments);return k};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=d.origGuideDestroy.apply(this,arguments);if(null!=d.guidePart)try{p.putImageData(d.guidePart.imgData1,d.guidePart.x1,
+d.guidePart.x3,d.guidePart.y3)}catch(L){}k=d.origGuideMove.apply(this,arguments);try{var m,n,q,t,v,y,x,A,G;p.lineWidth=.5;p.strokeStyle=g.guideClr;p.setLineDash([2]);c?(n=a.y+k.y+l-this.graph.container.scrollTop,m=0,v=n+a.height/2,t=l/2,A=n+a.height,x=0,q=p.getImageData(m,n-1,l,3),u(m,n,l,n),n--,y=p.getImageData(t,v-1,l,3),u(t,v,l,v),v--,G=p.getImageData(x,A-1,l,3),u(x,A,l,A),A--):(n=0,m=a.x+k.x+l-this.graph.container.scrollLeft,v=l/2,t=m+a.width/2,A=0,x=m+a.width,q=p.getImageData(m-1,n,3,l),u(m,
+n,m,l),m--,y=p.getImageData(t-1,v,3,l),u(t,v,t,l),t--,G=p.getImageData(x-1,A,3,l),u(x,A,x,l),x--);if(null==d.guidePart||d.guidePart.x1!=m||d.guidePart.y1!=n)d.guidePart={imgData1:q,x1:m,y1:n,imgData2:y,x2:t,y2:v,imgData3:G,x3:x,y3:A}}catch(L){}}else k=d.origGuideMove.apply(this,arguments);return k};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=d.origGuideDestroy.apply(this,arguments);if(null!=d.guidePart)try{p.putImageData(d.guidePart.imgData1,d.guidePart.x1,
d.guidePart.y1),p.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),p.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3),d.guidePart=null}catch(x){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
mxRuler.prototype.formatText=function(a){switch(this.unit){case mxConstants.POINTS:return Math.round(a);case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
@@ -10942,10 +10945,10 @@ this.pageListener);null!=this.container&&this.container.parentNode.removeChild(t
function mxDualRuler(a,e){var c=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=a.getDiagramContainerOffset;a.getDiagramContainerOffset=function(){return c};this.editorUiRefresh=a.refresh;this.ui=a;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(a,e,!0);this.hRuler=new mxRuler(a,e,!1,!0);var b=mxUtils.bind(this,function(b){var c=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,
function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,function(e){if(a.editor.graph.isEnabled()&&!a.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(e)||mxEvent.isPopupTrigger(e))){a.editor.graph.popupMenuHandler.hideMenu();a.hideCurrentMenu();if(!mxEvent.isTouchEvent(e)||!c){var d=new mxPopupMenu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,["points","millimeters"],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);a.resetCurrentMenu();d.destroy()});var f=mxEvent.getClientX(e),k=mxEvent.getClientY(e);d.popup(f,k,null,e);a.setCurrentMenu(d,b)}mxEvent.consume(e)}}))});b(this.hRuler.container);b(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};
-mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var e=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=e){var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,k=[],f,l=[],d,g=!1,m=!0,n=[],p=!1,u=!0;this.setClosedPath=function(a){g=a};this.setAutoClose=function(a){m=a};this.setStopClickEnabled=function(a){u=a};this.setSmoothing=function(a){c=a};var t=function(b){p=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
-b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){t(!0)};this.isDrawing=function(){return p};var q=mxUtils.bind(this,function(a){if(b){var c=u&&0<l.length&&null!=d&&2>d.length;c||l.push.apply(l,d);d=[];l.push(null);k.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<k.length){for(var c=l[0].x,d=l[0].x,e=l[0].y,f=l[0].y,n=1;n<l.length;n++)null!=l[n]&&(c=Math.max(c,l[n].x),d=Math.min(d,l[n].x),e=Math.max(e,
-l[n].y),f=Math.min(f,l[n].y));c-=d;e-=f;if(0<c&&0<e){var p=100/c,q=100/e;l.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-f)*q;return a});for(var u='<shape strokewidth="inherit"><foreground>',v=0,n=0;n<l.length;n++){var x=l[n];if(null==x){var x=!1,v=l[v],y=l[n-1];!g&&m&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(g||x)u+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';u+="</path>"+(g||x?"<fillstroke/>":"<stroke/>");v=n+1}else u=n==v?u+('<path><move x="'+x.x.toFixed(2)+
-'" y="'+x.y.toFixed(2)+'"/>'):u+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var n=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(u+"</foreground></shape>")+");fillColor=none;",u=a.view.scale,v=a.view.translate,L=new mxCell("",new mxGeometry(d/u-v.x,f/u-v.y,c/u,e/u),n);L.vertex=1;a.model.beginUpdate();try{L=a.addCell(L)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[L]));a.fireEvent(new mxEventObject("freehandInserted","cell",L));setTimeout(function(){a.setSelectionCells([L])},
-10)}for(n=0;n<k.length;n++)k[n].parentNode.removeChild(k[n]);b=null;k=[];l=[]}t(!1)};mxEvent.addGestureListeners(e,function(c){if(p){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var k=
+mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var e=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=e){var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,k=[],f,l=[],d,g=!1,m=!0,n=[],p=!1,t=!0;this.setClosedPath=function(a){g=a};this.setAutoClose=function(a){m=a};this.setStopClickEnabled=function(a){t=a};this.setSmoothing=function(a){c=a};var u=function(b){p=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
+b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){u(!0)};this.isDrawing=function(){return p};var q=mxUtils.bind(this,function(a){if(b){var c=t&&0<l.length&&null!=d&&2>d.length;c||l.push.apply(l,d);d=[];l.push(null);k.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<k.length){for(var c=l[0].x,d=l[0].x,e=l[0].y,f=l[0].y,n=1;n<l.length;n++)null!=l[n]&&(c=Math.max(c,l[n].x),d=Math.min(d,l[n].x),e=Math.max(e,
+l[n].y),f=Math.min(f,l[n].y));c-=d;e-=f;if(0<c&&0<e){var p=100/c,q=100/e;l.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-f)*q;return a});for(var t='<shape strokewidth="inherit"><foreground>',v=0,n=0;n<l.length;n++){var x=l[n];if(null==x){var x=!1,v=l[v],y=l[n-1];!g&&m&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(g||x)t+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';t+="</path>"+(g||x?"<fillstroke/>":"<stroke/>");v=n+1}else t=n==v?t+('<path><move x="'+x.x.toFixed(2)+
+'" y="'+x.y.toFixed(2)+'"/>'):t+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var n=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(t+"</foreground></shape>")+");fillColor=none;",t=a.view.scale,v=a.view.translate,L=new mxCell("",new mxGeometry(d/t-v.x,f/t-v.y,c/t,e/t),n);L.vertex=1;a.model.beginUpdate();try{L=a.addCell(L)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[L]));a.fireEvent(new mxEventObject("freehandInserted","cell",L));setTimeout(function(){a.setSelectionCells([L])},
+10)}for(n=0;n<k.length;n++)k[n].parentNode.removeChild(k[n]);b=null;k=[];l=[]}u(!1)};mxEvent.addGestureListeners(e,function(c){if(p){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var k=
a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",k=k.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",k)}n=[];k=v(c);x(k);f="M"+k.x+" "+k.y;l.push(k);d=[];b.setAttribute("d",f);e.appendChild(b);mxEvent.consume(c)}},function(a){if(b){x(v(a));var c=y(0);if(c){f+=" L"+c.x+" "+c.y;l.push(c);var e="";d=[];for(var g=2;g<n.length;g+=2)c=y(g),e+=" L"+c.x+" "+c.y,d.push(c);b.setAttribute("d",f+e)}mxEvent.consume(a)}},q);var v=function(b){return mxUtils.convertPoint(a.container,
mxEvent.getClientX(b),mxEvent.getClientY(b))},x=function(a){for(n.push(a);n.length>c;)n.shift()},y=function(a){var b=n.length;if(1===b%2||b>=c){var d=0,e=0,f,g=0;for(f=a;f<b;f++)g++,a=n[f],d+=a.x,e+=a.y;return{x:d/g,y:e/g}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index 4c5a6fac..2c5d7097 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -1189,10 +1189,7 @@ App.prototype.initializeEmbedMode = function()
{
if (window.location.hostname == 'app.diagrams.net')
{
- if (window.console != null)
- {
- console.warn('[Deprecation] app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net.');
- }
+ this.showBanner('EmbedDeprecationFooter', 'app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net.');
}
if (App.embedModePluginsCount > 0 || this.initEmbedDone)
@@ -2758,7 +2755,7 @@ App.prototype.start = function()
}
if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp && !this.isOfflineApp() &&
- urlParams['open'] == null && /.*\.draw\.io$/.test(window.location.hostname) &&
+ urlParams['open'] == null && /www\.draw\.io$/.test(window.location.hostname) &&
(!this.editor.chromeless || this.editor.editable))
{
this.showNameChangeBanner();
@@ -3300,7 +3297,7 @@ App.prototype.showSplash = function(force)
showSecondDialog();
}), rowLimit);
- this.showDialog(dlg.container, (rowLimit < 3) ? 240 : 300,
+ this.showDialog(dlg.container, (rowLimit < 3) ? 260 : 320,
(serviceCount >= 4) ? 440 : ((this.isOfflineApp()) ? 300 : 320), true, false);
dlg.init();
}
diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js
index 33dc6187..b9786850 100644
--- a/src/main/webapp/js/diagramly/Devel.js
+++ b/src/main/webapp/js/diagramly/Devel.js
@@ -13,48 +13,56 @@ if (!mxIsElectron && location.protocol !== 'http:')
var csp = 'default-src \'self\'; ' +
// storage.googleapis.com is needed for workbox-service-worker
'script-src %script-src% \'self\' https://storage.googleapis.com ' +
- 'https://apis.google.com https://*.pusher.com https://code.jquery.com '+
- 'https://www.dropbox.com https://api.trello.com ' +
+ 'https://apis.google.com https://*.pusher.com https://code.jquery.com ' +
// Scripts in index.html (not checked here)
'\'sha256-JqdgAC+ydIDMtmQclZEqgbw94J4IeABIfXAxwEJGDJs=\' ' +
'\'sha256-4Dg3/NrB8tLC7TUSCbrtUDWD/J6bSLka01GHn+qtNZ0=\'; ' +
- 'connect-src \'self\' https://*.draw.io https://*.diagrams.net https://*.googleapis.com wss://*.pusher.com https://*.pusher.com ' +
+ 'connect-src %connect-src% \'self\' https://*.draw.io https://*.diagrams.net https://*.googleapis.com wss://*.pusher.com https://*.pusher.com ' +
'https://api.github.com https://raw.githubusercontent.com https://gitlab.com ' +
'https://graph.microsoft.com https://*.sharepoint.com https://*.1drv.com ' +
- 'https://*.dropboxapi.com https://api.trello.com https://*.google.com ' +
- 'https://fonts.gstatic.com https://fonts.googleapis.com; ' +
+ 'https://*.google.com https://fonts.gstatic.com https://fonts.googleapis.com; ' +
// font-src about: is required for MathJax HTML-CSS output with STIX
'img-src * data:; media-src * data:; font-src * about:; ' +
- // www.draw.io required for browser data migration to app.diagrams.net
- 'frame-src %frame-src% \'self\' https://www.draw.io https://*.google.com; ' +
+ // www.draw.io required for browser data migration to app.diagrams.net and
+ // viewer.diagrams.net required for iframe embed preview
+ 'frame-src %frame-src% \'self\' https://viewer.diagrams.net https://www.draw.io https://*.google.com; ' +
'style-src %style-src% \'self\' \'unsafe-inline\' https://fonts.googleapis.com;'
var devCsp = csp.
// Adds script tags and loads shapes with eval
- replace(/%script-src%/g, 'https://devhost.jgraph.com \'unsafe-eval\'').
+ replace(/%script-src%/g, 'https://www.dropbox.com https://api.trello.com https://devhost.jgraph.com \'unsafe-eval\'').
// Loads common.css from mxgraph
+ replace(/%connect-src%/g, 'https://*.dropboxapi.com https://api.trello.com').
replace(/%style-src%/g, 'https://devhost.jgraph.com').
replace(/%frame-src%/g, '').
replace(/ /g, ' ');
mxmeta(null, devCsp, 'Content-Security-Policy');
- console.log('Content-Security-Policy')
- console.log('Development:', devCsp)
- console.log('app.diagrams.net:',
- csp.replace(/%script-src%/g, '').
+ if (urlParams['print-csp'] == '1')
+ {
+ console.log('Content-Security-Policy')
+ console.log('Development:', devCsp)
+ console.log('app.diagrams.net:',
+ csp.replace(/%script-src%/g, 'https://www.dropbox.com https://api.trello.com').
+ replace(/%connect-src%/g, 'https://*.dropboxapi.com https://api.trello.com').
replace(/%frame-src%/g, '').
- replace(/%style-src%/g, '').
- replace(/ /g, ' '));
- console.log('confluence.draw.io:',
- csp.replace(/%script-src%/g, 'https://aui-cdn.atlassian.com https://connect-cdn.atl-paas.net https://ajax.googleapis.com').
- replace(/%frame-src%/g, 'https://www.lucidchart.com https://app.lucidchart.com').
- replace(/%style-src%/g, 'https://aui-cdn.atlassian.com https://*.atlassian.net').
- replace(/ /g, ' '));
- console.log('jira.draw.io:',
- csp.replace(/%script-src%/g, 'https://connect-cdn.atl-paas.net').
- replace(/%frame-src%/g, '').
- replace(/%style-src%/g, 'https://aui-cdn.atlassian.com https://*.atlassian.net').
- replace(/ /g, ' '));
+ replace(/%style-src%/g, '').
+ replace(/ /g, ' '));
+ console.log('confluence.draw.io:',
+ csp.replace(/%script-src%/g, 'https://aui-cdn.atlassian.com https://connect-cdn.atl-paas.net https://ajax.googleapis.com').
+ replace(/%frame-src%/g, 'https://www.lucidchart.com https://app.lucidchart.com').
+ replace(/%style-src%/g, 'https://aui-cdn.atlassian.com https://*.atlassian.net').
+ replace(/%connect-src%/g, '').
+ replace(/ /g, ' '));
+ console.log('jira.draw.io:',
+ csp.replace(/%script-src%/g, 'https://connect-cdn.atl-paas.net').
+ replace(/%frame-src%/g, '').
+ replace(/%style-src%/g, 'https://aui-cdn.atlassian.com https://*.atlassian.net').
+ replace(/%connect-src%/g, '').
+ replace(/ /g, ' '));
+ console.log('import.diagrams.net:', 'default-src \'self\'; worker-src blob:; img-src \'self\' blob: data: https://www.lucidchart.com ' +
+ 'https://app.lucidchart.com; style-src \'self\' \'unsafe-inline\'; frame-src https://www.lucidchart.com https://app.lucidchart.com;');
+ }
})();
}
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 3ea34553..f8018748 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -51,18 +51,6 @@ var StorageDialog = function(editorUi, fn, rowLimit)
div.appendChild(help);
}
- var demo = document.createElement('div');
- demo.style.position = 'absolute';
- demo.style.cursor = 'pointer';
- demo.style.fontSize = '12px';
- demo.style.bottom = bottom;
- demo.style.color = 'gray';
- demo.style.userSelect = 'none';
-
- mxUtils.write(demo, mxResources.get('decideLater'));
- mxUtils.setPrefixedStyle(demo.style, 'transform', 'translate(-50%,0)');
- demo.style.left = '50%';
-
this.init = function()
{
if (mxClient.IS_QUIRKS || document.documentMode == 8)
@@ -70,17 +58,7 @@ var StorageDialog = function(editorUi, fn, rowLimit)
demo.style.marginLeft = -Math.round(demo.clientWidth / 2) + 'px';
}
};
-
- div.appendChild(demo);
-
- mxEvent.addListener(demo, 'click', function()
- {
- editorUi.hideDialog();
- var prev = Editor.useLocalStorage;
- editorUi.createFile(editorUi.defaultFilename, null, null, null, null, null, null, true);
- Editor.useLocalStorage = prev;
- });
-
+
var buttons = document.createElement('div');
if (mxClient.IS_QUIRKS)
@@ -354,7 +332,6 @@ var StorageDialog = function(editorUi, fn, rowLimit)
{
var showMore = document.createElement('a');
showMore.style.color = 'gray';
- showMore.style.fontSize = '12px';
showMore.style.cursor = 'pointer';
showMore.style.userSelect = 'none';
mxUtils.write(showMore, ((StorageDialog.extended) ? mxResources.get('showLess') : mxResources.get('showMore')) + '...');
@@ -372,23 +349,54 @@ var StorageDialog = function(editorUi, fn, rowLimit)
mxEvent.consume(evt);
});
}
-
- p2.appendChild(cb);
- var span = document.createElement('span');
- span.style.color = 'gray';
- span.style.fontSize = '12px';
- span.style.userSelect = 'none';
- mxUtils.write(span, ' ' + mxResources.get('rememberThisSetting'));
- p2.appendChild(span);
- mxUtils.br(p2);
+ var demo = document.createElement('div');
+ demo.style.cursor = 'pointer';
+ demo.style.color = 'gray';
+ demo.style.userSelect = 'none';
+
+ mxUtils.write(demo, mxResources.get('import') + ': ' + mxResources.get('gliffy') + ', ' +
+ mxResources.get('formatVssx') + ', ' + mxResources.get('formatVsdx') + ', ' +
+ mxResources.get('lucidchart') + '...');
+
+ mxEvent.addListener(demo, 'click', function()
+ {
+ if (editorUi.storageFileInputElt == null)
+ {
+ var input = document.createElement('input');
+ input.setAttribute('type', 'file');
+
+ mxEvent.addListener(input, 'change', function()
+ {
+ if (input.files != null)
+ {
+ // Using null for position will disable crop of input file
+ editorUi.hideDialog();
+ editorUi.openFiles(input.files, true);
+
+ // Resets input to force change event for same file (type reset required for IE)
+ input.type = '';
+ input.type = 'file';
+ input.value = '';
+ }
+ });
+
+ input.style.display = 'none';
+ document.body.appendChild(input);
+ editorUi.storageFileInputElt = input;
+ }
+
+ editorUi.storageFileInputElt.click();
+ });
+
+ p2.appendChild(demo);
var recent = editorUi.getRecent();
if (!editorUi.isOfflineApp() && recent != null && recent.length > 0)
{
var recentSelect = document.createElement('select');
- recentSelect.style.marginTop = '8px';
+ recentSelect.style.marginTop = '12px';
recentSelect.style.maxWidth = '170px';
var titleOption = document.createElement('option');
@@ -445,57 +453,51 @@ var StorageDialog = function(editorUi, fn, rowLimit)
var link = document.createElement('a');
link.style.cursor = 'pointer';
- link.style.fontSize = '12px';
link.style.color = 'gray';
link.style.userSelect = 'none';
- mxUtils.write(link, mxResources.get('import') + ': ' + mxResources.get('gliffy') + ', ' +
- mxResources.get('formatVssx') + ', ' + mxResources.get('formatVsdx') + ', ' +
- mxResources.get('lucidchart') + '...');
-
+ mxUtils.write(link, mxResources.get('decideLater'));
mxEvent.addListener(link, 'click', function()
{
- if (editorUi.storageFileInputElt == null)
- {
- var input = document.createElement('input');
- input.setAttribute('type', 'file');
-
- mxEvent.addListener(input, 'change', function()
- {
- if (input.files != null)
- {
- // Using null for position will disable crop of input file
- editorUi.hideDialog();
- editorUi.openFiles(input.files, true);
-
- // Resets input to force change event for same file (type reset required for IE)
- input.type = '';
- input.type = 'file';
- input.value = '';
- }
- });
-
- input.style.display = 'none';
- document.body.appendChild(input);
- editorUi.storageFileInputElt = input;
- }
-
- editorUi.storageFileInputElt.click();
+ editorUi.hideDialog();
+ var prev = Editor.useLocalStorage;
+ editorUi.createFile(editorUi.defaultFilename, null, null, null, null, null, null, true);
+ Editor.useLocalStorage = prev;
});
-
+
temp.appendChild(link);
p2.appendChild(temp);
buttons.style.paddingBottom = '4px';
}
buttons.appendChild(p2);
-
- mxEvent.addListener(span, 'click', function(evt)
- {
- cb.checked = !cb.checked;
- mxEvent.consume(evt);
- });
+ var temp = document.createElement('div');
+ temp.style.position = 'absolute';
+ temp.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
+ temp.style.cursor = 'pointer';
+ temp.style.fontSize = '12px';
+ temp.style.bottom = '27px';
+ temp.style.left = '0px';
+ temp.style.right = '0px';
+ temp.style.color = 'gray';
+ temp.style.userSelect = 'none';
+
+ cb.setAttribute('id', 'geRememberSettingCheckbox');
+ cb.style.marginRight = '6px';
+ cb.style.cursor = 'inherit';
+ temp.appendChild(cb);
+
+ var label = document.createElement('label');
+ label.setAttribute('for', 'geRememberSettingCheckbox');
+ mxUtils.write(label, mxResources.get('rememberThisSetting'));
+ label.style.cursor = 'inherit';
+ temp.appendChild(label);
+
+ mxUtils.setPrefixedStyle(temp.style, 'transform', 'translate(-50%,0)');
+ temp.style.left = '50%';
+ div.appendChild(temp);
+
// Checks if Google Drive is missing after a 5 sec delay
if (mxClient.IS_SVG && isLocalStorage && urlParams['gapi'] != '0' &&
(document.documentMode == null || document.documentMode >= 10))
@@ -506,7 +508,7 @@ var StorageDialog = function(editorUi, fn, rowLimit)
{
// To check for Disconnect plugin in chrome use mxClient.IS_GC and check for URL:
// chrome-extension://jeoacafpbcihiomhlakheieifhpjdfeo/scripts/vendor/jquery/jquery-2.0.3.min.map
- p3.style.padding = '8px';
+ p3.style.padding = '7px';
p3.style.fontSize = '9pt';
p3.style.marginTop = '-14px';
p3.innerHTML = '<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" ' +
@@ -6499,7 +6501,7 @@ var FindWindow = function(ui, x, y, w, h)
mxEvent.addListener(searchInput, 'keyup', function(evt)
{
// Ctrl or Cmd keys
- if (evt.keyCode == 91 || evt.keyCode == 17)
+ if (evt.keyCode == 91 || evt.keyCode == 93 || evt.keyCode == 17)
{
// Workaround for lost focus on show
mxEvent.consume(evt);
diff --git a/src/main/webapp/js/diagramly/DrawioFile.js b/src/main/webapp/js/diagramly/DrawioFile.js
index 467d0d55..1d8f9a87 100644
--- a/src/main/webapp/js/diagramly/DrawioFile.js
+++ b/src/main/webapp/js/diagramly/DrawioFile.js
@@ -1494,7 +1494,7 @@ DrawioFile.prototype.addUnsavedStatus = function(err)
((msg != null && msg != '') ? ' (' + mxUtils.htmlEntities(msg) + ')' : '');
this.ui.editor.setStatus('<div title="'+ status +
'" class="geStatusAlertOrange" style="cursor:pointer;overflow:hidden;">' + status + ' <img src="' +
- Editor.saveImage + '" align="top" style="width:16px;margin-top:-2px"/></div>');
+ Editor.saveImage + '" align="top" style="width:16px;margin-top:' + ((mxClient.IS_FF) ? -3 : -2) + 'px"/></div>');
// Installs click handler for saving
var links = this.ui.statusContainer.getElementsByTagName('div');
diff --git a/src/main/webapp/js/diagramly/DriveClient.js b/src/main/webapp/js/diagramly/DriveClient.js
index 34d1940c..f6adb6df 100644
--- a/src/main/webapp/js/diagramly/DriveClient.js
+++ b/src/main/webapp/js/diagramly/DriveClient.js
@@ -1656,7 +1656,7 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
{
file.saveLevel = 9;
- if (realOverwrite)
+ if (realOverwrite || etag == null)
{
doExecuteSave(realOverwrite);
}
diff --git a/src/main/webapp/js/diagramly/DriveFile.js b/src/main/webapp/js/diagramly/DriveFile.js
index 90874333..1c6b3c32 100644
--- a/src/main/webapp/js/diagramly/DriveFile.js
+++ b/src/main/webapp/js/diagramly/DriveFile.js
@@ -229,7 +229,7 @@ DriveFile.prototype.saveFile = function(title, revision, success, error, unloadi
}
}), error, token);
}
- else
+ else if (success != null)
{
success(resp);
}
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index cec9557f..2d9531c5 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -231,6 +231,11 @@
Editor.configVersion = null;
/**
+ * Default border for image export (to allow for sketch style).
+ */
+ Editor.defaultBorder = 5;
+
+ /**
* Common properties for all edges.
*/
Editor.commonProperties = [
@@ -3056,7 +3061,7 @@
bg = (keepTheme) ? this.graph.defaultPageBackgroundColor : '#ffffff';;
}
- this.convertImages(graph.getSvg(null, null, null, noCrop, null, ignoreSelection,
+ this.convertImages(graph.getSvg(null, null, border, noCrop, null, ignoreSelection,
null, null, null, addShadow, null, keepTheme), mxUtils.bind(this, function(svgRoot)
{
try
@@ -3077,8 +3082,8 @@
scale = (!limitHeight) ? width / w : Math.min(1, Math.min((width * 3) / (h * 4), width / w));
}
- w = Math.ceil(scale * w) + 2 * border;
- h = Math.ceil(scale * h) + 2 * border;
+ w = Math.ceil(scale * w);
+ h = Math.ceil(scale * h);
canvas.setAttribute('width', w);
canvas.setAttribute('height', h);
@@ -3101,13 +3106,13 @@
{
window.setTimeout(function()
{
- ctx.drawImage(img, border / scale, border / scale);
+ ctx.drawImage(img, 0, 0);
callback(canvas);
}, 0);
}
else
{
- ctx.drawImage(img, border / scale, border / scale);
+ ctx.drawImage(img, 0, 0);
callback(canvas);
}
};
@@ -3125,8 +3130,8 @@
var b = graph.getGraphBounds();
var tx = view.translate.x * curViewScale;
var ty = view.translate.y * curViewScale;
- var x0 = tx + (b.x - tx) / curViewScale;
- var y0 = ty + (b.y - ty) / curViewScale;
+ var x0 = tx + (b.x - tx) / curViewScale - border;
+ var y0 = ty + (b.y - ty) / curViewScale - border;
var background = new Image();
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index b87ff4f7..a7654335 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -38,6 +38,11 @@
EditorUi.drawHost = window.DRAWIO_BASE_URL;
/**
+ * Protocol and hostname to use for embedded files. Default is https://www.draw.io
+ */
+ EditorUi.lightboxHost = window.DRAWIO_LIGHTBOX_URL;
+
+ /**
* Switch to disable logging for mode and search terms.
*/
EditorUi.lastErrorMessage = null;
@@ -4513,7 +4518,7 @@
{
this.spinner.stop();
this.handleError(e);
- }), null, null, null, null, null, null, null, 5);
+ }), null, null, null, null, null, null, null, Editor.defaultBorder);
mxEvent.addListener(this.editor.graph.container, 'click', clickHandler);
document.body.appendChild(this.exportDialog);
@@ -5055,7 +5060,7 @@
*/
EditorUi.prototype.createLink = function(linkTarget, linkColor, allPages, lightbox, editLink, layers, url, ignoreFile, params)
{
- params = (params != null) ? params : this.createUrlParameters(linkTarget, linkColor, allPages, lightbox, editLink, layers);
+ params = (params != null) ? params : this.createUrlParameters(linkTarget, linkColor, allPages, false, editLink, layers);
var file = this.getCurrentFile();
var addTitle = true;
var data = '';
@@ -5087,8 +5092,9 @@
params.push('title=' + encodeURIComponent(file.getTitle()));
}
- return ((mxClient.IS_CHROMEAPP || EditorUi.isElectronApp || !(/.*\.draw\.io$/.test(window.location.hostname))) ?
- EditorUi.drawHost : 'https://' + window.location.host) + '/' +
+ return ((lightbox) ? EditorUi.lightboxHost : (((mxClient.IS_CHROMEAPP ||
+ EditorUi.isElectronApp || !(/.*\.draw\.io$/.test(window.location.hostname))) ?
+ EditorUi.drawHost : 'https://' + window.location.host))) + '/' +
((params.length > 0) ? '?' + params.join('&') : '') + data;
};
@@ -5415,10 +5421,18 @@
allPages = this.addCheckbox(div, mxResources.get('allPages'), hasPages, !hasPages);
}
- var lightbox = this.addCheckbox(div, mxResources.get('lightbox'), true);
+ var lightbox = this.addCheckbox(div, mxResources.get('lightbox'), true, null, null, !showFrameOption);
var editSection = this.addEditButton(div, lightbox);
var edit = editSection.getEditInput();
+ // Cannot disable lightbox in iframes
+ if (showFrameOption)
+ {
+ edit.style.marginLeft = lightbox.style.marginLeft;
+ lightbox.style.display = 'none';
+ dy -= 30;
+ }
+
var layers = this.addCheckbox(div, mxResources.get('layers'), true);
layers.style.marginLeft = edit.style.marginLeft;
layers.style.marginBottom = '16px';
@@ -5819,7 +5833,7 @@
{
// KNOWN: Message passing does not seem to work in IE11
onclick = " onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(" +
- "img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('" + EditorUi.drawHost + "/?client=1&lightbox=1" +
+ "img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('" + EditorUi.lightboxHost + "/?client=1" +
((edit) ? "&edit=_blank" : "") +
((layers) ? '&layers=1' : '') + "');}})(this);\"";
css += 'cursor:pointer;';
@@ -5842,9 +5856,6 @@
if (this.isExportToCanvas())
{
- var scale = 1;
- var ignoreSelection = true;
-
this.editor.exportToCanvas(mxUtils.bind(this, function(canvas)
{
var xml = (lightbox) ? this.getFileData(true) : null;
@@ -5853,7 +5864,7 @@
}), null, null, null, mxUtils.bind(this, function(e)
{
err({message: mxResources.get('unknownError')});
- }), null, true, (retina) ? 2 : 1, null, shadow);
+ }), null, true, (retina) ? 2 : 1, null, shadow, null, null, Editor.defaultBorder);
}
else
{
@@ -5943,7 +5954,7 @@
{
// KNOWN: Message passing does not seem to work in IE11
onclick = "onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(" +
- "img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('" + EditorUi.drawHost + "/?client=1&lightbox=1" +
+ "img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('" + EditorUi.lightboxHost + "/?client=1" +
((edit) ? "&edit=_blank" : "") + ((layers) ? '&layers=1' : '') + "');}})(this);\"";
css += 'cursor:pointer;';
}
@@ -5978,7 +5989,7 @@
"svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};" +
"window.addEventListener('message',r);" +
// Opens lightbox window
- "svg.wnd=window.open('" + EditorUi.drawHost + "/?client=1&lightbox=1" +
+ "svg.wnd=window.open('" + EditorUi.lightboxHost + "/?client=1" +
((edit) ? "&edit=_blank" : "") + ((layers) ? '&layers=1' : '') + "');}}})(this);";
svgRoot.setAttribute('onclick', js);
css += 'cursor:pointer;';
@@ -9359,7 +9370,7 @@
this.dialog == null && source.nodeName != 'INPUT' && source.nodeName != 'TEXTAREA')
{
if (evt.keyCode == 224 /* FF */ || (!mxClient.IS_MAC && evt.keyCode == 17 /* Control */) ||
- (mxClient.IS_MAC && evt.keyCode == 91 /* Meta */))
+ (mxClient.IS_MAC && (evt.keyCode == 91 || evt.keyCode == 93) /* Left/Right Meta */))
{
// Cannot use parentNode for check in IE
if (!restoreFocus)
diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js
index 46e64329..f27a7b28 100644
--- a/src/main/webapp/js/diagramly/Init.js
+++ b/src/main/webapp/js/diagramly/Init.js
@@ -19,6 +19,7 @@ window.isSvgBrowser = window.isSvgBrowser || navigator.userAgent == null ||
// CUSTOM_PARAMETERS - URLs for save and export
window.DRAWIO_BASE_URL = window.DRAWIO_BASE_URL || ((/.*\.draw\.io$/.test(window.location.hostname)) ?
window.location.protocol + '//' + window.location.hostname : 'https://app.diagrams.net');
+window.DRAWIO_LIGHTBOX_URL = window.DRAWIO_LIGHTBOX_URL || 'https://viewer.diagrams.net';
window.EXPORT_URL = window.EXPORT_URL || 'https://exp.draw.io/ImageExport4/export';
window.PLANT_URL = window.PLANT_URL || 'https://plant-aws.diagrams.net';
window.DRAW_MATH_URL = window.DRAW_MATH_URL || window.DRAWIO_BASE_URL + '/math';
@@ -331,17 +332,23 @@ if (urlParams['offline'] == '1' || urlParams['demo'] == '1' || urlParams['stealt
urlParams['tr'] = '0';
}
+// Disables math in offline mode
+if (urlParams['offline'] == '1' || urlParams['local'] == '1')
+{
+ urlParams['math'] = '0';
+}
+
// Uses embed mode on embed domain
if (window.location.hostname == 'embed.diagrams.net')
{
urlParams['embed'] = '1';
}
-// Disables math in offline mode
-if (urlParams['offline'] == '1' || urlParams['local'] == '1')
+// Uses lightbox mode on viewer domain
+if (window.location.hostname == 'viewer.diagrams.net')
{
- urlParams['math'] = '0';
-}
+ urlParams['lightbox'] = '1';
+}
// Lightbox enables chromeless mode
if (urlParams['lightbox'] == '1')
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 49bcba14..3bb939c3 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -665,17 +665,13 @@
editorUi.actions.addAction('keyboardShortcuts...', function()
{
- if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
- {
- editorUi.openLink('https://www.draw.io/shortcuts.svg');
- }
- else if (mxClient.IS_SVG)
+ if (mxClient.IS_SVG && !mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp)
{
editorUi.openLink('shortcuts.svg');
}
else
{
- editorUi.openLink('https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg');
+ editorUi.openLink('https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg');
}
});
diff --git a/src/main/webapp/js/mxgraph/EditorUi.js b/src/main/webapp/js/mxgraph/EditorUi.js
index 06cf2d41..3416a9a9 100644
--- a/src/main/webapp/js/mxgraph/EditorUi.js
+++ b/src/main/webapp/js/mxgraph/EditorUi.js
@@ -1185,6 +1185,7 @@ EditorUi.prototype.installShapePicker = function()
{
if (cell == null && ui.sidebar != null && !mxEvent.isShiftDown(evt))
{
+ mxEvent.consume(evt);
var pt = mxUtils.convertPoint(this.container, mxEvent.getClientX(evt), mxEvent.getClientY(evt));
ui.showShapePicker(pt.x, pt.y);
}
@@ -1217,6 +1218,7 @@ EditorUi.prototype.installShapePicker = function()
{
var temp = graph.getCompositeParent(state.cell);
var geo = graph.getCellGeometry(temp);
+ me.consume();
while (temp != null && graph.model.isVertex(temp) && geo != null && geo.relative)
{
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index e4692d27..226b9b4a 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -188,16 +188,16 @@ newSeed:function(){return U.newSeed()}}}();
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");
-window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";
-window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";
-window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
-window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
+window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";
+window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";
+window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";
+window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskadi",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
he:"עברית",ar:"العربية",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net",b=a.length-c.length,c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");
+if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");"viewer.diagrams.net"==window.location.hostname&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");
(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"4.2.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&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:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&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.")&&
@@ -2149,12 +2149,12 @@ Editor.prototype.setFilename=function(a){this.filename=a};
Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,f){c.undoableEditHappened(f.getProperty("edit"))};var f=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,c){var f=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<f.length){a.getModel();for(var k=[],b=0;b<
f.length;b++)null!=a.view.getState(f[b])&&k.push(f[b]);a.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,f);c.addListener(mxEvent.REDO,f);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,c,f,d,k,n,q,b,e,g,p){var m=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(m=80);f+=m;d+=m;var l=f,v=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var y=t.height,x=Math.max(1,Math.round((t.width-f-64)/2)),D=Math.max(1,Math.round((y-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,y-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=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";x+=t.x;D+=t.y;k&&document.body.appendChild(this.bg);var A=a.createDiv(e?"geTransDialog":
-"geDialog");k=this.getPosition(x,D,f,d);x=k.x;D=k.y;A.style.width=f+"px";A.style.height=d+"px";A.style.left=x+"px";A.style.top=D+"px";A.style.zIndex=this.zIndex;A.appendChild(c);document.body.appendChild(A);!b&&c.clientHeight>A.clientHeight-64&&(c.style.overflowY="auto");if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=D+14+"px",n.style.left=x+f+38-m+"px",n.style.zIndex=
-this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=n,!p)){var C=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){C=!0}),null,mxUtils.bind(this,function(b){C&&(a.hideDialog(!0),C=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g();null!=e&&(l=f=e.w,v=d=e.h)}e=mxUtils.getDocumentSize();y=e.height;this.bg.style.height=y+"px";x=Math.max(1,Math.round((e.width-f-64)/2));D=Math.max(1,
-Math.round((y-d-a.footerHeight)/3));f=null!=document.body?Math.min(l,document.body.scrollWidth-64):l;d=Math.min(v,y-64);e=this.getPosition(x,D,f,d);x=e.x;D=e.y;A.style.left=x+"px";A.style.top=D+"px";A.style.width=f+"px";A.style.height=d+"px";!b&&c.clientHeight>A.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=x+f+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
-A;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,c,f,d,k,m,q,b,e,g,p){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);f+=n;d+=n;var l=f,x=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var y=t.height,v=Math.max(1,Math.round((t.width-f-64)/2)),D=Math.max(1,Math.round((y-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,y-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=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";v+=t.x;D+=t.y;k&&document.body.appendChild(this.bg);var z=a.createDiv(e?"geTransDialog":
+"geDialog");k=this.getPosition(v,D,f,d);v=k.x;D=k.y;z.style.width=f+"px";z.style.height=d+"px";z.style.left=v+"px";z.style.top=D+"px";z.style.zIndex=this.zIndex;z.appendChild(c);document.body.appendChild(z);!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=D+14+"px",m.style.left=v+f+38-n+"px",m.style.zIndex=
+this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!p)){var C=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){C=!0}),null,mxUtils.bind(this,function(b){C&&(a.hideDialog(!0),C=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g();null!=e&&(l=f=e.w,x=d=e.h)}e=mxUtils.getDocumentSize();y=e.height;this.bg.style.height=y+"px";v=Math.max(1,Math.round((e.width-f-64)/2));D=Math.max(1,
+Math.round((y-d-a.footerHeight)/3));f=null!=document.body?Math.min(l,document.body.scrollWidth-64):l;d=Math.min(x,y-64);e=this.getPosition(v,D,f,d);v=e.x;D=e.y;z.style.left=v+"px";z.style.top=D+"px";z.style.width=f+"px";z.style.height=d+"px";!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=v+f+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
+z;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -2163,47 +2163,47 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,c,f,d,k,n,q,b,e,g,p){e=null!=e?e:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var l=document.createElement("div");l.style.padding="0px";l.style.margin="0px";l.style.fontSize="18px";l.style.paddingBottom="16px";l.style.marginBottom="10px";l.style.borderBottom="1px solid #c0c0c0";l.style.color="gray";l.style.whiteSpace="nowrap";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,c);l.setAttribute("title",c);m.appendChild(l)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=f;m.appendChild(c);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=n&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();n()}),c.className="geBtn",f.appendChild(c),f.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=p&&p()}),g.className="geBtn",f.appendChild(g));var v=mxUtils.button(d,function(){e&&a.hideDialog();null!=k&&k()});
-v.className="geBtn";f.appendChild(v);null!=q&&(d=mxUtils.button(q,function(){e&&a.hideDialog();null!=b&&b()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){v.focus()};m.appendChild(f);this.container=m},PrintDialog=function(a,c){this.create(a,c)};
-PrintDialog.prototype.create=function(a){function c(a){var e=b.checked||g.checked,d=parseInt(m.value)/100;isNaN(d)&&(d=1,m.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,l=1/f.pageScale;if(e){var n=b.checked?1:parseInt(p.value);isNaN(n)||(l=mxUtils.getScaleForPageCount(n,f,c))}f.getGraphBounds();var k=n=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);l*=d;!e&&f.pageVisible?(d=f.getPageLayout(),n-=d.x*c.width,k-=d.y*c.height):
-e=!0;e=PrintDialog.createPrintPreview(f,l,c,0,n,k,e);e.open();a&&PrintDialog.printPreview(e)}var f=a.editor.graph,d,k,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var b=document.createElement("input");b.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(b);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
+var ErrorDialog=function(a,c,f,d,k,m,q,b,e,g,p){e=null!=e?e:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var l=document.createElement("div");l.style.padding="0px";l.style.margin="0px";l.style.fontSize="18px";l.style.paddingBottom="16px";l.style.marginBottom="10px";l.style.borderBottom="1px solid #c0c0c0";l.style.color="gray";l.style.whiteSpace="nowrap";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,c);l.setAttribute("title",c);n.appendChild(l)}c=
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=f;n.appendChild(c);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=m&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),c.className="geBtn",f.appendChild(c),f.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=p&&p()}),g.className="geBtn",f.appendChild(g));var x=mxUtils.button(d,function(){e&&a.hideDialog();null!=k&&k()});
+x.className="geBtn";f.appendChild(x);null!=q&&(d=mxUtils.button(q,function(){e&&a.hideDialog();null!=b&&b()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){x.focus()};n.appendChild(f);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
+PrintDialog.prototype.create=function(a){function c(a){var e=b.checked||g.checked,d=parseInt(n.value)/100;isNaN(d)&&(d=1,n.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,l=1/f.pageScale;if(e){var m=b.checked?1:parseInt(p.value);isNaN(m)||(l=mxUtils.getScaleForPageCount(m,f,c))}f.getGraphBounds();var k=m=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);l*=d;!e&&f.pageVisible?(d=f.getPageLayout(),m-=d.x*c.width,k-=d.y*c.height):
+e=!0;e=PrintDialog.createPrintPreview(f,l,c,0,m,k,e);e.open();a&&PrintDialog.printPreview(e)}var f=a.editor.graph,d,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var b=document.createElement("input");b.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(b);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
k.appendChild(e);mxEvent.addListener(e,"click",function(a){b.checked=!b.checked;g.checked=!b.checked;mxEvent.consume(a)});mxEvent.addListener(b,"change",function(){g.checked=!b.checked});d.appendChild(k);q.appendChild(d);d=d.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);e=document.createElement("span");mxUtils.write(e," "+mxResources.get("posterPrint")+":");k.appendChild(e);mxEvent.addListener(e,
"click",function(a){g.checked=!g.checked;b.checked=!g.checked;mxEvent.consume(a)});d.appendChild(k);var p=document.createElement("input");p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.setAttribute("size","4");p.setAttribute("disabled","disabled");p.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(p);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);q.appendChild(d);mxEvent.addListener(g,"change",
-function(){g.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");b.checked=!g.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";k.appendChild(m);d.appendChild(k);q.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
+function(){g.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");b.checked=!g.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";k.appendChild(n);d.appendChild(k);q.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
k.style.paddingTop="20px";k.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&k.appendChild(e);if(PrintDialog.previewEnabled){var l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});l.className="geBtn";k.appendChild(l)}l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});l.className="geBtn gePrimaryBtn";k.appendChild(l);a.editor.cancelFirst||
-k.appendChild(e);d.appendChild(k);q.appendChild(d);n.appendChild(q);this.container=n};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(f){}};
-PrintDialog.createPrintPreview=function(a,c,f,d,k,n,q){c=new mxPrintPreview(a,c,f,d,k,n);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var b=c.writeHead;c.writeHead=function(a){b.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c};
+k.appendChild(e);d.appendChild(k);q.appendChild(d);m.appendChild(q);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(f){}};
+PrintDialog.createPrintPreview=function(a,c,f,d,k,m,q){c=new mxPrintPreview(a,c,f,d,k,m);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var b=c.writeHead;c.writeHead=function(a){b.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function c(){null==p||p==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=p,g.style.backgroundImage="")}function f(){null==v?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(l.setAttribute("title",v.src),l.style.fontSize="11px",l.innerHTML=mxUtils.htmlEntities(v.src.substring(0,42))+"...")}var d=a.editor.graph,k,
-n,q=document.createElement("table");q.style.width="100%";q.style.height="100%";var b=document.createElement("tbody");k=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var e=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);b.appendChild(k);k=document.createElement("tr");
-n=document.createElement("td");mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="18px";g.style.height="18px";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var p=d.background;c();mxEvent.addListener(g,"click",function(b){a.pickColor(p||"none",function(a){p=
-a;c()});mxEvent.consume(b)});n.appendChild(g);mxUtils.write(n,mxResources.get("gridSize")+":");var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.style.width="40px";m.style.marginLeft="6px";m.value=d.getGridSize();n.appendChild(m);mxEvent.addListener(m,"change",function(){var a=parseInt(m.value);m.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(n);b.appendChild(k);k=document.createElement("tr");n=document.createElement("td");mxUtils.write(n,
-mxResources.get("image")+":");k.appendChild(n);n=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var v=d.backgroundImage;mxEvent.addListener(l,"click",function(b){a.showBackgroundImageDialog(function(a,b){b||(v=a,f())},v);mxEvent.consume(b)});f();n.appendChild(l);k.appendChild(n);b.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align",
-"right");var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&n.appendChild(t);var y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(m.value);isNaN(b)||d.gridSize===b||d.setGridSize(b);b=new ChangePageSetup(a,p,v,e.get());b.ignoreColor=d.background==p;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=v?v.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==
-b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||d.model.execute(b)});y.className="geBtn gePrimaryBtn";n.appendChild(y);a.editor.cancelFirst||n.appendChild(t);k.appendChild(n);b.appendChild(k);q.appendChild(b);this.container=q};
-PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function k(a,d,c){if(c||m!=document.activeElement&&l!=document.activeElement){a=!1;for(d=0;d<t.length;d++)c=t[d],A?"custom"==c.key&&(b.value=c.key,A=!1):null!=c.format&&("a4"==c.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==c.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==c.format.width&&
-f.height==c.format.height?(b.value=c.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):f.width==c.format.height&&f.height==c.format.width&&(b.value=c.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(e.style.display="",p.style.display="none"):(m.value=f.width/100,l.value=f.height/100,n.setAttribute("checked","checked"),
-b.value="custom",e.style.display="none",p.style.display="")}}c="format-"+c;var n=document.createElement("input");n.setAttribute("name",c);n.setAttribute("type","radio");n.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",c);q.setAttribute("type","radio");q.setAttribute("value","landscape");var b=document.createElement("select");b.style.marginBottom="8px";b.style.width="202px";var e=document.createElement("div");e.style.marginLeft="4px";e.style.width="210px";
-e.style.height="24px";n.style.marginRight="6px";e.appendChild(n);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));e.appendChild(c);q.style.marginLeft="10px";q.style.marginRight="6px";e.appendChild(q);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));e.appendChild(g);var p=document.createElement("div");p.style.marginLeft="4px";p.style.width="210px";p.style.height="24px";var m=document.createElement("input");
-m.setAttribute("size","7");m.style.textAlign="right";p.appendChild(m);mxUtils.write(p," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";p.appendChild(l);mxUtils.write(p," in");e.style.display="none";p.style.display="none";for(var v={},t=PageSetupDialog.getFormats(),y=0;y<t.length;y++){var x=t[y];v[x.key]=x;var D=document.createElement("option");D.setAttribute("value",x.key);mxUtils.write(D,x.title);b.appendChild(D)}var A=!1;k();a.appendChild(b);mxUtils.br(a);
-a.appendChild(e);a.appendChild(p);var C=f,z=function(a,c){var g=v[b.value];null!=g.format?(m.value=g.format.width/100,l.value=g.format.height/100,p.style.display="none",e.style.display=""):(e.style.display="none",p.style.display="");g=parseFloat(m.value);if(isNaN(g)||0>=g)m.value=f.width/100;g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)),Math.floor(100*parseFloat(l.value)));"custom"!=b.value&&q.checked&&(g=new mxRectangle(0,0,
-g.height,g.width));c&&A||g.width==C.width&&g.height==C.height||(C=g,null!=d&&d(C))};mxEvent.addListener(c,"click",function(a){n.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){q.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(m,"blur",z);mxEvent.addListener(m,"click",z);mxEvent.addListener(l,"blur",z);mxEvent.addListener(l,"click",z);mxEvent.addListener(q,"change",z);mxEvent.addListener(n,"change",z);mxEvent.addListener(b,"change",function(a){A="custom"==b.value;
-z(a,!0)});z();return{set:function(a){f=a;k(null,null,!0)},get:function(){return C},widthInput:m,heightInput:l}};
+var PageSetupDialog=function(a){function c(){null==p||p==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=p,g.style.backgroundImage="")}function f(){null==x?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(l.setAttribute("title",x.src),l.style.fontSize="11px",l.innerHTML=mxUtils.htmlEntities(x.src.substring(0,42))+"...")}var d=a.editor.graph,k,
+m,q=document.createElement("table");q.style.width="100%";q.style.height="100%";var b=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var e=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");
+m=document.createElement("td");mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="18px";g.style.height="18px";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var p=d.background;c();mxEvent.addListener(g,"click",function(b){a.pickColor(p||"none",function(a){p=
+a;c()});mxEvent.consume(b)});m.appendChild(g);mxUtils.write(m,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=d.getGridSize();m.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,
+mxResources.get("image")+":");k.appendChild(m);m=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var x=d.backgroundImage;mxEvent.addListener(l,"click",function(b){a.showBackgroundImageDialog(function(a,b){b||(x=a,f())},x);mxEvent.consume(b)});f();m.appendChild(l);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align",
+"right");var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);var y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||d.gridSize===b||d.setGridSize(b);b=new ChangePageSetup(a,p,x,e.get());b.ignoreColor=d.background==p;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=x?x.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==
+b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||d.model.execute(b)});y.className="geBtn gePrimaryBtn";m.appendChild(y);a.editor.cancelFirst||m.appendChild(t);k.appendChild(m);b.appendChild(k);q.appendChild(b);this.container=q};
+PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function k(a,d,c){if(c||n!=document.activeElement&&l!=document.activeElement){a=!1;for(d=0;d<t.length;d++)c=t[d],z?"custom"==c.key&&(b.value=c.key,z=!1):null!=c.format&&("a4"==c.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==c.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==c.format.width&&
+f.height==c.format.height?(b.value=c.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):f.width==c.format.height&&f.height==c.format.width&&(b.value=c.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(e.style.display="",p.style.display="none"):(n.value=f.width/100,l.value=f.height/100,m.setAttribute("checked","checked"),
+b.value="custom",e.style.display="none",p.style.display="")}}c="format-"+c;var m=document.createElement("input");m.setAttribute("name",c);m.setAttribute("type","radio");m.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",c);q.setAttribute("type","radio");q.setAttribute("value","landscape");var b=document.createElement("select");b.style.marginBottom="8px";b.style.width="202px";var e=document.createElement("div");e.style.marginLeft="4px";e.style.width="210px";
+e.style.height="24px";m.style.marginRight="6px";e.appendChild(m);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));e.appendChild(c);q.style.marginLeft="10px";q.style.marginRight="6px";e.appendChild(q);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));e.appendChild(g);var p=document.createElement("div");p.style.marginLeft="4px";p.style.width="210px";p.style.height="24px";var n=document.createElement("input");
+n.setAttribute("size","7");n.style.textAlign="right";p.appendChild(n);mxUtils.write(p," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";p.appendChild(l);mxUtils.write(p," in");e.style.display="none";p.style.display="none";for(var x={},t=PageSetupDialog.getFormats(),y=0;y<t.length;y++){var v=t[y];x[v.key]=v;var D=document.createElement("option");D.setAttribute("value",v.key);mxUtils.write(D,v.title);b.appendChild(D)}var z=!1;k();a.appendChild(b);mxUtils.br(a);
+a.appendChild(e);a.appendChild(p);var C=f,A=function(a,c){var g=x[b.value];null!=g.format?(n.value=g.format.width/100,l.value=g.format.height/100,p.style.display="none",e.style.display=""):(e.style.display="none",p.style.display="");g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=f.width/100;g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(l.value)));"custom"!=b.value&&q.checked&&(g=new mxRectangle(0,0,
+g.height,g.width));c&&z||g.width==C.width&&g.height==C.height||(C=g,null!=d&&d(C))};mxEvent.addListener(c,"click",function(a){m.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){q.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",A);mxEvent.addListener(n,"click",A);mxEvent.addListener(l,"blur",A);mxEvent.addListener(l,"click",A);mxEvent.addListener(q,"change",A);mxEvent.addListener(m,"change",A);mxEvent.addListener(b,"change",function(a){z="custom"==b.value;
+A(a,!0)});A();return{set:function(a){f=a;k(null,null,!0)},get:function(){return C},widthInput:n,heightInput:l}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,c,f,d,k,n,q,b,e,g,p,m){e=null!=e?e:!0;var l,v,t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";l=document.createElement("tr");v=document.createElement("td");v.style.whiteSpace="nowrap";v.style.fontSize="10pt";v.style.width=p?"80px":"120px";mxUtils.write(v,(k||mxResources.get("filename"))+":");l.appendChild(v);var x=document.createElement("input");x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=m?m+
-"px":"180px";var D=mxUtils.button(f,function(){if(null==n||n(x.value))e&&a.hideDialog(),d(x.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
-mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=x,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};v=document.createElement("td");
-v.style.whiteSpace="nowrap";v.appendChild(x);l.appendChild(v);if(null!=k||null==q)y.appendChild(l),null!=p&&(null!=a.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),l.style.marginLeft="6px",l.style.width="74px",v.appendChild(l),x.style.width=null!=m?m-40+"px":"140px"),v.appendChild(FilenameDialog.createTypeHint(a,x,p)));null!=q&&(l=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(q),l.appendChild(v),y.appendChild(l));l=
-document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop="20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&v.appendChild(p);null!=b&&(m=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(b)}),m.className="geBtn",v.appendChild(m));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&D.click()});
-v.appendChild(D);a.editor.cancelFirst||v.appendChild(p);l.appendChild(v);y.appendChild(l);t.appendChild(y);this.container=t};FilenameDialog.filenameHelpLink=null;
+var FilenameDialog=function(a,c,f,d,k,m,q,b,e,g,p,n){e=null!=e?e:!0;var l,x,t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";l=document.createElement("tr");x=document.createElement("td");x.style.whiteSpace="nowrap";x.style.fontSize="10pt";x.style.width=p?"80px":"120px";mxUtils.write(x,(k||mxResources.get("filename"))+":");l.appendChild(x);var v=document.createElement("input");v.setAttribute("value",c||"");v.style.marginLeft="4px";v.style.width=null!=n?n+
+"px":"180px";var D=mxUtils.button(f,function(){if(null==m||m(v.value))e&&a.hideDialog(),d(v.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
+mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=v,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(v.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};x=document.createElement("td");
+x.style.whiteSpace="nowrap";x.appendChild(v);l.appendChild(x);if(null!=k||null==q)y.appendChild(l),null!=p&&(null!=a.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(a,v,a.editor.diagramFileTypes),l.style.marginLeft="6px",l.style.width="74px",x.appendChild(l),v.style.width=null!=n?n-40+"px":"140px"),x.appendChild(FilenameDialog.createTypeHint(a,v,p)));null!=q&&(l=document.createElement("tr"),x=document.createElement("td"),x.colSpan=2,x.appendChild(q),l.appendChild(x),y.appendChild(l));l=
+document.createElement("tr");x=document.createElement("td");x.colSpan=2;x.style.paddingTop="20px";x.style.whiteSpace="nowrap";x.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&x.appendChild(p);null!=b&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(b)}),n.className="geBtn",x.appendChild(n));mxEvent.addListener(v,"keypress",function(a){13==a.keyCode&&D.click()});
+x.appendChild(D);a.editor.cancelFirst||x.appendChild(p);l.appendChild(x);y.appendChild(l);t.appendChild(y);this.container=t};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(a,c,f){var d=document.createElement("img");d.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(d,70);var k=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var a=0;a<f.length;a++)if(0<f[a].ext.length&&c.value.toLowerCase().substring(c.value.length-f[a].ext.length-1)=="."+f[a].ext){d.setAttribute("src",
mxClient.imageBasePath+"/warning.png");d.setAttribute("title",mxResources.get(f[a].title));break}};mxEvent.addListener(c,"keyup",k);mxEvent.addListener(c,"change",k);mxEvent.addListener(d,"click",function(c){var f=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=f&&a.showError(null,f,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
mxEvent.consume(c)});k();return d};
-FilenameDialog.createFileTypes=function(a,c,f){var d=document.createElement("select");for(a=0;a<f.length;a++){var k=document.createElement("option");k.setAttribute("value",a);mxUtils.write(k,mxResources.get(f[a].description)+" (."+f[a].extension+")");d.appendChild(k)}mxEvent.addListener(d,"change",function(a){a=f[d.value].extension;var n=c.value.lastIndexOf(".");0<n?(a=f[d.value].extension,c.value=c.value.substring(0,n+1)+a):c.value=c.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
-a.initEvent("change",!1,!0),c.dispatchEvent(a)):c.fireEvent("onchange")});a=function(a){var n=c.value.lastIndexOf(".");a=0;if(0<n)for(var n=c.value.toLowerCase().substring(n+1),b=0;b<f.length;b++)if(n==f[b].extension){a=b;break}d.value=a};mxEvent.addListener(c,"change",a);mxEvent.addListener(c,"keyup",a);a();return d};
+FilenameDialog.createFileTypes=function(a,c,f){var d=document.createElement("select");for(a=0;a<f.length;a++){var k=document.createElement("option");k.setAttribute("value",a);mxUtils.write(k,mxResources.get(f[a].description)+" (."+f[a].extension+")");d.appendChild(k)}mxEvent.addListener(d,"change",function(a){a=f[d.value].extension;var m=c.value.lastIndexOf(".");0<m?(a=f[d.value].extension,c.value=c.value.substring(0,m+1)+a):c.value=c.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
+a.initEvent("change",!1,!0),c.dispatchEvent(a)):c.fireEvent("onchange")});a=function(a){var m=c.value.lastIndexOf(".");a=0;if(0<m)for(var m=c.value.toLowerCase().substring(m+1),b=0;b<f.length;b++)if(m==f[b].extension){a=b;break}d.value=a};mxEvent.addListener(c,"change",a);mxEvent.addListener(c,"keyup",a);a();return d};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var e=a.container.firstChild;null!=e&&e.nodeType!=mxConstants.NODETYPE_ELEMENT;)e=e.nextSibling;null!=e&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),e.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,e),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(b){a.dblClick(b)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),
mxUtils.bind(this,function(b){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
@@ -2211,33 +2211,33 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
d="url("+this.gridImage+")";var f=e=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),e=1+f.x,f=1+f.y);c=-Math.round(c-mxUtils.mod(this.translate.x*this.scale-e,c))+"px "+-Math.round(c-mxUtils.mod(this.translate.y*this.scale-f,c))+"px"}e=a.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=c,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
b,a.container.className="geDiagramContainer geDiagramBackdrop",e.style.backgroundImage="none",e.style.backgroundColor=""):(a.container.className="geDiagramContainer",e.style.backgroundPosition=c,e.style.backgroundColor=b,e.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var e=this.gridSteps*b,d=[],c=1;c<this.gridSteps;c++){var f=c*b;d.push("M 0 "+f+" L "+e+" "+f+" M "+f+" 0 L "+f+" "+e)}return'<svg width="'+
e+'" height="'+e+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+e+'" height="'+e+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+e+" 0 L 0 0 0 "+e+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=
-this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+d,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+b,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,e){var d=this.view.scale,c=this.view.translate,f=this.pageFormat,l=d*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;e=n.height;var t=
-new mxRectangle(d*c.x,d*c.y,f.width*l,f.height*l),k=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,x=a?Math.ceil(b/t.width)-1:0,q=n.x+b,A=n.y+e;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?k:x,e=0;e<=b;e++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(e+1)*t.height)),
-new mxPoint(Math.round(q),Math.round(n.y+(e+1)*t.height))]:[new mxPoint(Math.round(n.x+(e+1)*t.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(e+1)*t.width),Math.round(A))];null!=a[e]?(a[e].points=d,a[e].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[e]=d)}for(e=b;e<a.length;e++)a[e].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+d,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+b,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,e){var d=this.view.scale,c=this.view.translate,f=this.pageFormat,l=d*this.pageScale,m=this.view.getBackgroundPageBounds();b=m.width;e=m.height;var t=
+new mxRectangle(d*c.x,d*c.y,f.width*l,f.height*l),k=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,v=a?Math.ceil(b/t.width)-1:0,q=m.x+b,z=m.y+e;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?k:v,e=0;e<=b;e++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(e+1)*t.height)),
+new mxPoint(Math.round(q),Math.round(m.y+(e+1)*t.height))]:[new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(z))];null!=a[e]?(a[e].points=d,a[e].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[e]=d)}for(e=b;e<a.length;e++)a[e].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,e){for(var d=0;d<b.length;d++){if(this.graph.isTableCell(b[d])||this.graph.isTableRow(b[d]))return!1;if(this.graph.getModel().isVertex(b[d])){var f=this.graph.getCellGeometry(b[d]);if(null!=f&&f.relative)return!1}}return c.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=f.apply(this,arguments);
a.intersects=mxUtils.bind(this,function(b,e){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,e=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,c=this.graph.pageScale,
f=d.width*c,d=d.height*c,c=Math.floor(Math.min(0,b)/f),l=Math.floor(Math.min(0,e)/d);return new mxRectangle(this.scale*(this.translate.x+c*f),this.scale*(this.translate.y+l*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-c)*f,this.scale*(Math.ceil(Math.max(1,e+a.height/this.scale)/d)-l)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&
-mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,e,d,c,f){var g=k.apply(this,arguments);null==f||f||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,e){var d,c=this.graph.model.getParent(a);
-if(b)return d=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(c)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isContainer(c)||this.graph.isPart(a));d=n.apply(this,arguments);if(this.graph.isTableCell(a)||this.graph.isTableRow(a))d=c,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(e.getEvent())||this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||
+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,b,e,d,c,f){var g=k.apply(this,arguments);null==f||f||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var m=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,e){var d,c=this.graph.model.getParent(a);
+if(b)return d=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(c)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isContainer(c)||this.graph.isPart(a));d=m.apply(this,arguments);if(this.graph.isTableCell(a)||this.graph.isTableRow(a))d=c,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(e.getEvent())||this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||
this.graph.isTableCell(a)&&this.graph.isCellSelected(c);return d};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),e=b.getParent(a),d=this.graph.view.getState(e),c=this.graph.isCellSelected(a);null!=d&&(b.isVertex(e)||b.isEdge(e));){var f=this.graph.isCellSelected(e),c=c||f;if(f||!c&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=e;e=b.getParent(e)}return a}})();EditorUi=function(a,c,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var d=this.editor.graph;d.lightbox=f;this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!d.standalone){this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,
function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=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?(c=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):d.panningHandler.usePopupTrigger=
-!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(c=d.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var n=d.graphHandler.start;d.graphHandler.start=function(){null!=x.hoverIcons&&x.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
+!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(c=d.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var m=d.graphHandler.start;d.graphHandler.start=function(){null!=v.hoverIcons&&v.hoverIcons.reset();m.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var q=!1,b=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,e){return q||b.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),
d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var e=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return e.apply(this,arguments)||q||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&
-(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.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 p=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return q||p.apply(this,arguments)};var m=!1,l=null,v=null,t=null,y=
-mxUtils.bind(this,function(){if(null!=this.toolbar&&m!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var c=0;c<t.length;c++)this.toolbar.container.appendChild(t[c]);this.toolbar.fontMenu=l;this.toolbar.sizeMenu=v}m=d.cellEditor.isContentEditing();
-l=a;v=e;t=b}}),x=this,D=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){D.apply(this,arguments);y();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=x.toolbar)){var e=b.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));x.toolbar.setFontName(e);
-x.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var A=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){try{A.apply(this,arguments),y()}catch(B){x.handleError(B)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
+(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.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 p=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return q||p.apply(this,arguments)};var n=!1,l=null,x=null,t=null,y=
+mxUtils.bind(this,function(){if(null!=this.toolbar&&n!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var c=0;c<t.length;c++)this.toolbar.container.appendChild(t[c]);this.toolbar.fontMenu=l;this.toolbar.sizeMenu=x}n=d.cellEditor.isContentEditing();
+l=a;x=e;t=b}}),v=this,D=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){D.apply(this,arguments);y();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=v.toolbar)){var e=b.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));v.toolbar.setFontName(e);
+v.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var z=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){try{z.apply(this,arguments),y()}catch(B){v.handleError(B)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(u){}var C=d.fireMouseEvent;d.fireMouseEvent=function(a,b,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();C.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,e){this.menus.createPopupMenu(a,b,e)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
-function(){return keyHandler};var z="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var b=
-d.view.getState(a);if(null!=b){var e=a.clone();e.style="";var c=d.getCellStyle(e);a=[];var e=[],g;for(g in b.style)c[g]!=b.style[g]&&(a.push(b.style[g]),e.push(g));for(var f=d.getModel().getStyle(b.cell),p=null!=f?f.split(";"):[],f=0;f<p.length;f++){var l=p[f],m=l.indexOf("=");if(0<=m){g=l.substring(0,m);var u=l.substring(m+1);null!=c[g]&&"none"==u&&(a.push(u),e.push(g))}}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
+function(){return keyHandler};var A="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var b=
+d.view.getState(a);if(null!=b){var e=a.clone();e.style="";var c=d.getCellStyle(e);a=[];var e=[],g;for(g in b.style)c[g]!=b.style[g]&&(a.push(b.style[g]),e.push(g));for(var f=d.getModel().getStyle(b.cell),p=null!=f?f.split(";"):[],f=0;f<p.length;f++){var l=p[f],n=l.indexOf("=");if(0<=n){g=l.substring(0,n);var u=l.substring(n+1);null!=c[g]&&"none"==u&&(a.push(u),e.push(g))}}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
e,"values",a,"cells",[b.cell]))}}catch(Y){this.handleError(Y)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),I=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
-["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<I.length;a++)for(c=0;c<I[a].length;c++)z.push(I[a][c]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(z,E[a])&&z.push(E[a]);var J=function(a,b,e){e=null!=e?e:d.getModel();e.beginUpdate();try{for(var c=0;c<a.length;c++){var g=a[c],f;if(b)f=["fontSize","fontFamily","fontColor"];else{var p=e.getStyle(g),l=null!=p?p.split(";"):[];f=z.slice();for(var m=0;m<l.length;m++){var u=l[m],B=u.indexOf("=");if(0<=B){var t=
-u.substring(0,B),K=mxUtils.indexOf(f,t);0<=K&&f.splice(K,1);for(var n=0;n<I.length;n++){var k=I[n];if(0<=mxUtils.indexOf(k,t))for(var y=0;y<k.length;y++){var v=mxUtils.indexOf(f,k[y]);0<=v&&f.splice(v,1)}}}}}for(var x=e.isEdge(g),q=x?d.currentEdgeStyle:d.currentVertexStyle,D=e.getStyle(g),m=0;m<f.length;m++){var t=f[m],A=q[t];null==A||"shape"==t&&!x||x&&!(0>mxUtils.indexOf(E,t))||(D=mxUtils.setStyle(D,t,A))}e.setStyle(g,D)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,b){J(b.getProperty("cells"))});
+["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<I.length;a++)for(c=0;c<I[a].length;c++)A.push(I[a][c]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(A,E[a])&&A.push(E[a]);var J=function(a,b,e){e=null!=e?e:d.getModel();e.beginUpdate();try{for(var c=0;c<a.length;c++){var g=a[c],f;if(b)f=["fontSize","fontFamily","fontColor"];else{var p=e.getStyle(g),l=null!=p?p.split(";"):[];f=A.slice();for(var n=0;n<l.length;n++){var u=l[n],B=u.indexOf("=");if(0<=B){var t=
+u.substring(0,B),K=mxUtils.indexOf(f,t);0<=K&&f.splice(K,1);for(var m=0;m<I.length;m++){var k=I[m];if(0<=mxUtils.indexOf(k,t))for(var y=0;y<k.length;y++){var x=mxUtils.indexOf(f,k[y]);0<=x&&f.splice(x,1)}}}}}for(var v=e.isEdge(g),q=v?d.currentEdgeStyle:d.currentVertexStyle,D=e.getStyle(g),n=0;n<f.length;n++){var t=f[n],z=q[t];null==z||"shape"==t&&!v||v&&!(0>mxUtils.indexOf(E,t))||(D=mxUtils.setStyle(D,t,z))}e.setStyle(g,D)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,b){J(b.getProperty("cells"))});
d.addListener("textInserted",function(a,b){J(b.getProperty("cells"),!0)});this.insertHandler=J;d.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var e=[b.getProperty("cell")];b.getProperty("terminalInserted")&&e.push(b.getProperty("terminal"));J(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var e=b.getProperty("cells"),c=!1,g=!1;if(0<e.length)for(var f=0;f<e.length&&(c=d.getModel().isVertex(e[f])||c,!(g=d.getModel().isEdge(e[f])||g)||!c);f++);else g=c=!0;for(var e=
-b.getProperty("keys"),p=b.getProperty("values"),f=0;f<e.length;f++){var l=0<=mxUtils.indexOf(G,e[f]);if("strokeColor"!=e[f]||null!=p[f]&&"none"!=p[f])if(0<=mxUtils.indexOf(E,e[f]))g||0<=mxUtils.indexOf(F,e[f])?null==p[f]?delete d.currentEdgeStyle[e[f]]:d.currentEdgeStyle[e[f]]=p[f]:c&&0<=mxUtils.indexOf(z,e[f])&&(null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=p[f]);else if(0<=mxUtils.indexOf(z,e[f])){if(c||l)null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=
+b.getProperty("keys"),p=b.getProperty("values"),f=0;f<e.length;f++){var l=0<=mxUtils.indexOf(G,e[f]);if("strokeColor"!=e[f]||null!=p[f]&&"none"!=p[f])if(0<=mxUtils.indexOf(E,e[f]))g||0<=mxUtils.indexOf(F,e[f])?null==p[f]?delete d.currentEdgeStyle[e[f]]:d.currentEdgeStyle[e[f]]=p[f]:c&&0<=mxUtils.indexOf(A,e[f])&&(null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=p[f]);else if(0<=mxUtils.indexOf(A,e[f])){if(c||l)null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=
p[f];if(g||l||0<=mxUtils.indexOf(F,e[f]))null==p[f]?delete d.currentEdgeStyle[e[f]]:d.currentEdgeStyle[e[f]]=p[f]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,
@@ -2251,13 +2251,13 @@ EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"
"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var c=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){c.apply(this,
arguments);f.updateActionStates()};a.editLink=f.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,c=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){"mouseDown"==d.getProperty("eventName")&&c.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));var f=
-a.dblClick;a.dblClick=function(a,d){if(this.isEnabled())if(null!=d||null==c.sidebar||mxEvent.isShiftDown(a))f.apply(this,arguments);else{var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));c.showShapePicker(b.x,b.y)}};if(null!=this.hoverIcons){var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(d,f,b){var e=b.getEvent();mxEvent.isControlDown(e)||mxEvent.isShiftDown(e)?
-k.apply(this,arguments):this.graph.connectVertex(d.cell,f,this.graph.defaultEdgeLength,e,null,null,mxUtils.bind(this,function(e,f,m){e=a.getCompositeParent(d.cell);for(f=a.getCellGeometry(e);null!=e&&a.model.isVertex(e)&&null!=f&&f.relative;)cell=e,e=a.model.getParent(cell),f=a.getCellGeometry(e);c.showShapePicker(b.getGraphX(),b.getGraphY(),e,mxUtils.bind(this,function(a){m(a)}))}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,e,this)}))}}};
-EditorUi.prototype.showShapePicker=function(a,c,f,d){var k=this.getCellsForShapePicker(f);if(null!=k&&0<k.length){var n=this,q=this.editor.graph,b=document.createElement("div"),e=null!=f?q.copyStyle(f):null;b.className="geToolbarContainer geSidebarContainer geSidebar";b.style.cssText="position:absolute;left:"+(a-22)+"px;top:"+(c-22)+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";null!=q.background&&q.background!=mxConstants.NONE&&
-(b.style.backgroundColor=q.background);q.container.appendChild(b);f=mxUtils.bind(this,function(g){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";b.appendChild(f);null!=e&&this.sidebar.graph.pasteStyle(e,[g]);n.insertHandler([g],""!=g.value,this.sidebar.graph.model);this.sidebar.createThumb([g],25,25,f,null,!0,!1,g.geometry.width,g.geometry.height);
-mxEvent.addListener(f,"click",function(){if(null!=d)d(g);else{g.geometry.x=q.snap(Math.round(a/q.view.scale)-q.view.translate.x-g.geometry.width/2);g.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-g.geometry.height/2);q.model.beginUpdate();try{q.addCell(g)}finally{q.model.endUpdate()}q.setSelectionCell(g);q.scrollCellToVisible(q.getSelectionCell());q.startEditingAtCell(g)}n.hideShapePicker()})});for(var g=0;g<k.length;g++)f(k[g]);q.tooltipHandler.hideTooltip();this.hideCurrentMenu();
+a.dblClick;a.dblClick=function(a,d){if(this.isEnabled())if(null!=d||null==c.sidebar||mxEvent.isShiftDown(a))f.apply(this,arguments);else{mxEvent.consume(a);var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));c.showShapePicker(b.x,b.y)}};if(null!=this.hoverIcons){var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(d,f,b){var e=b.getEvent();mxEvent.isControlDown(e)||
+mxEvent.isShiftDown(e)?k.apply(this,arguments):this.graph.connectVertex(d.cell,f,this.graph.defaultEdgeLength,e,null,null,mxUtils.bind(this,function(e,f,n){e=a.getCompositeParent(d.cell);f=a.getCellGeometry(e);for(b.consume();null!=e&&a.model.isVertex(e)&&null!=f&&f.relative;)cell=e,e=a.model.getParent(cell),f=a.getCellGeometry(e);c.showShapePicker(b.getGraphX(),b.getGraphY(),e,mxUtils.bind(this,function(a){n(a)}))}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,e,this)}))}}};
+EditorUi.prototype.showShapePicker=function(a,c,f,d){var k=this.getCellsForShapePicker(f);if(null!=k&&0<k.length){var m=this,q=this.editor.graph,b=document.createElement("div"),e=null!=f?q.copyStyle(f):null;b.className="geToolbarContainer geSidebarContainer geSidebar";b.style.cssText="position:absolute;left:"+(a-22)+"px;top:"+(c-22)+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";null!=q.background&&q.background!=mxConstants.NONE&&
+(b.style.backgroundColor=q.background);q.container.appendChild(b);f=mxUtils.bind(this,function(g){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";b.appendChild(f);null!=e&&this.sidebar.graph.pasteStyle(e,[g]);m.insertHandler([g],""!=g.value,this.sidebar.graph.model);this.sidebar.createThumb([g],25,25,f,null,!0,!1,g.geometry.width,g.geometry.height);
+mxEvent.addListener(f,"click",function(){if(null!=d)d(g);else{g.geometry.x=q.snap(Math.round(a/q.view.scale)-q.view.translate.x-g.geometry.width/2);g.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-g.geometry.height/2);q.model.beginUpdate();try{q.addCell(g)}finally{q.model.endUpdate()}q.setSelectionCell(g);q.scrollCellToVisible(q.getSelectionCell());q.startEditingAtCell(g)}m.hideShapePicker()})});for(var g=0;g<k.length;g++)f(k[g]);q.tooltipHandler.hideTooltip();this.hideCurrentMenu();
this.hideShapePicker();this.shapePickerCallback=d;this.shapePicker=b}};
-EditorUi.prototype.getCellsForShapePicker=function(a){var c=mxUtils.bind(this,function(a,d,c,n){return this.editor.graph.createVertex(null,null,n||"",0,0,d||120,c||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):c("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),c("whiteSpace=wrap;html=1;"),c("ellipse;whiteSpace=wrap;html=1;",120,80),c("rhombus;whiteSpace=wrap;html=1;",80,80),c("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;"),
+EditorUi.prototype.getCellsForShapePicker=function(a){var c=mxUtils.bind(this,function(a,d,c,m){return this.editor.graph.createVertex(null,null,m||"",0,0,d||120,c||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):c("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),c("whiteSpace=wrap;html=1;"),c("ellipse;whiteSpace=wrap;html=1;",120,80),c("rhombus;whiteSpace=wrap;html=1;",80,80),c("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;"),
c("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;",120,60),c("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),c("shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;",120,80),c("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",
80,100),c("triangle;whiteSpace=wrap;html=1;",60,80),c("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),c("shape=tape;whiteSpace=wrap;html=1;",120,100),c("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),c("shape=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;",60,80)]};
EditorUi.prototype.hideShapePicker=function(a){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,a||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};EditorUi.prototype.onKeyDown=function(a){var c=this.editor.graph;9!=a.which||!c.isEnabled()||mxEvent.isAltDown(a)||c.isEditing()&&mxEvent.isShiftDown(a)||(c.isEditing()?c.stopEditing(!1):c.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
@@ -2268,31 +2268,31 @@ EditorUi.prototype.getCssClassForMarker=function(a,c,f,d){return"flexArrow"==c?n
f==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==f?"geSprite geSprite-"+a+"openasync":"dash"==f?"geSprite geSprite-"+a+"dash":"cross"==f?"geSprite geSprite-"+a+"cross":"async"==f?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==f||"circlePlus"==f?"1"==d||"circle"==f?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==f?"geSprite geSprite-"+a+"erone":"ERmandOne"==
f?"geSprite geSprite-"+a+"eronetoone":"ERmany"==f?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==f?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==f?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==f?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,c=this.actions.get("paste"),f=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));f.setEnabled(c.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var c=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var c=c||d.getSelectionCells(),c=d.getExportableCells(d.model.getTopmostCells(c)),b={},e=d.createCellLookup(c),g=d.cloneCells(c,null,b),f=new mxGraphModel,m=f.getChildAt(f.getRoot(),
-0),l=0;l<g.length;l++){f.add(m,g[l]);var k=d.view.getState(c[l]);if(null!=k){var t=d.getCellGeometry(g[l]);null!=t&&t.relative&&!f.isEdge(c[l])&&null==e[mxObjectIdentity.get(f.getParent(c[l]))]&&(t.offset=null,t.relative=!1,t.x=k.x/k.view.scale-k.view.translate.x,t.y=k.y/k.view.scale-k.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(b,e),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return c};var f=mxClipboard.paste;mxClipboard.paste=function(d){var c=
+EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var c=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var c=c||d.getSelectionCells(),c=d.getExportableCells(d.model.getTopmostCells(c)),b={},e=d.createCellLookup(c),g=d.cloneCells(c,null,b),f=new mxGraphModel,n=f.getChildAt(f.getRoot(),
+0),l=0;l<g.length;l++){f.add(n,g[l]);var k=d.view.getState(c[l]);if(null!=k){var t=d.getCellGeometry(g[l]);null!=t&&t.relative&&!f.isEdge(c[l])&&null==e[mxObjectIdentity.get(f.getParent(c[l]))]&&(t.offset=null,t.relative=!1,t.x=k.x/k.view.scale-k.view.translate.x,t.y=k.y/k.view.scale-k.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(b,e),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return c};var f=mxClipboard.paste;mxClipboard.paste=function(d){var c=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):c=f.apply(this,arguments);a.updatePasteActionStates();return c};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};var k=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,c){k.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.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)};a.getPreferredPageSize=function(a,b,e){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,e,d,c){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;c=null!=c?c:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),p=a.view.translate,l=a.view.scale,m=mxRectangle.fromRectangle(g);
-m.x=m.x/l-p.x;m.y=m.y/l-p.y;m.width/=l;m.height/=l;var p=a.container.scrollTop,u=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var B=a.container.offsetWidth-t,t=a.container.offsetHeight-t;b=b?Math.max(.3,Math.min(e||1,B/m.width)):l;e=(B-b*m.width)/2/b;var L=0==this.lightboxVerticalDivider?0:(t-b*m.height)/this.lightboxVerticalDivider/b;f&&(e=Math.max(e,0),L=Math.max(L,0));if(f||g.width<B||g.height<t)a.view.scaleAndTranslate(b,
-Math.floor(e-m.x),Math.floor(L-m.y)),a.container.scrollTop=p*b/l,a.container.scrollLeft=u*b/l;else if(0!=d||0!=c)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/l),Math.floor(g.y+c/l))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
+this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,e){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,e,d,c){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;c=null!=c?c:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),p=a.view.translate,l=a.view.scale,n=mxRectangle.fromRectangle(g);
+n.x=n.x/l-p.x;n.y=n.y/l-p.y;n.width/=l;n.height/=l;var p=a.container.scrollTop,u=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var B=a.container.offsetWidth-t,t=a.container.offsetHeight-t;b=b?Math.max(.3,Math.min(e||1,B/n.width)):l;e=(B-b*n.width)/2/b;var L=0==this.lightboxVerticalDivider?0:(t-b*n.height)/this.lightboxVerticalDivider/b;f&&(e=Math.max(e,0),L=Math.max(L,0));if(f||g.width<B||g.height<t)a.view.scaleAndTranslate(b,
+Math.floor(e-n.x),Math.floor(L-n.y)),a.container.scrollTop=p*b/l,a.container.scrollLeft=u*b/l;else if(0!=d||0!=c)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/l),Math.floor(g.y+c/l))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
-this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var n=mxUtils.bind(this,function(){var b=
-mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var q=0,n=mxUtils.bind(this,function(a,b,e){q++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=e&&d.setAttribute("title",
-e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=k.backBtn&&n(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var b=n(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),
-e=document.createElement("div");e.style.display="inline-block";e.style.verticalAlign="top";e.style.fontFamily="Helvetica,Arial";e.style.marginTop="8px";e.style.fontSize="14px";e.style.color="#ffffff";this.chromelessToolbar.appendChild(e);var g=n(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(e.innerHTML="",mxUtils.write(e,
-mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});b.style.paddingLeft="0px";b.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",b.style.display="",e.style.display="inline-block"):(g.style.display="none",b.style.display="none",e.style.display="none");p()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",
-p)}n(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,
-mxResources.get("fit"));var l=null,v=null,t=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),a||200)}),y=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=v&&(window.clearTimeout(v),
-fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=n(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
-null}));var e=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){x.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(b){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var A=this.lightboxToolbarActions[m];n(A.fn,A.icon,A.tooltip)}null!=k.refreshBtn&&n(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
-window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(b){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,
+this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var b=
+mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var q=0,m=mxUtils.bind(this,function(a,b,e){q++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=e&&d.setAttribute("title",
+e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=k.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var b=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),
+e=document.createElement("div");e.style.display="inline-block";e.style.verticalAlign="top";e.style.fontFamily="Helvetica,Arial";e.style.marginTop="8px";e.style.fontSize="14px";e.style.color="#ffffff";this.chromelessToolbar.appendChild(e);var g=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(e.innerHTML="",mxUtils.write(e,
+mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});b.style.paddingLeft="0px";b.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",b.style.display="",e.style.display="inline-block"):(g.style.display="none",b.style.display="none",e.style.display="none");p()});this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",
+p)}m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,
+mxResources.get("fit"));var l=null,x=null,t=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=x&&(window.clearTimeout(x),fadeThead2=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;x=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";x=null}),600)}),a||200)}),y=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=x&&(window.clearTimeout(x),
+fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var v=m(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
+null}));var e=v.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){v.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(b){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(n=0;n<this.lightboxToolbarActions.length;n++){var z=this.lightboxToolbarActions[n];m(z.fn,z.icon,z.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
+window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(b){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,
function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
y(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():y(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
y(30)}));var C=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,e){this.startX=e.getGraphX();this.startY=e.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,e){mxEvent.isTouchEvent(e.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<C&&Math.abs(this.scrollTop-a.container.scrollTop)<C&&Math.abs(this.startX-e.getGraphX())<C&&Math.abs(this.startY-e.getGraphY())<
-C&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?t():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}z.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange=
+C&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?t():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var A=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}A.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange=
function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),e=this.getPagePadding(),d=this.getPageSize(),c=Math.ceil(2*e.x+b.width*d.width),g=Math.ceil(2*e.y+b.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=c||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,c,g);c=e.x-b.x*d.width;e=e.y-b.y*d.height;this.autoTranslate||this.view.translate.x==c&&this.view.translate.y==e?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=
b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(c,e),a.container.scrollLeft+=Math.round((c-b)*a.view.scale),a.container.scrollTop+=Math.round((e-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,J=null,u=null,K=null,B=function(b){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,
function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";G.style.transform=""},0)):(F.style.transform=
@@ -2324,19 +2324,19 @@ this.previousFormat=c);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.e
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousPageScale=d.pageScale;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};
EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),c=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var n=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,b){n.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),f=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var n=0;n<k.length;n++){var q=k[n];a.getModel().isEdge(q)&&(d=!0);a.getModel().isVertex(q)&&(f=!0);if(d&&f)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(n=
-0;n<k.length;n++)this.actions.get(k[n]).setEnabled(c);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(f);this.actions.get("wordWrap").setEnabled(f);this.actions.get("autosize").setEnabled(f);d=f&&1==
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),c=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var m=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,b){m.apply(this,arguments);d()};d()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),f=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var m=0;m<k.length;m++){var q=k[m];a.getModel().isEdge(q)&&(d=!0);a.getModel().isVertex(q)&&(f=!0);if(d&&f)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(m=
+0;m<k.length;m++)this.actions.get(k[m]).setEnabled(c);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(f);this.actions.get("wordWrap").setEnabled(f);this.actions.get("autosize").setEnabled(f);d=f&&1==
a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(c||null!=a.view.currentRoot);
this.actions.get("collapsible").setEnabled(f&&(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()));c=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(c);this.actions.get("collapse").setEnabled(c);
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);c=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(c);this.menus.get("insert").setEnabled(c);this.menus.get("direction").setEnabled(c&&f);this.menus.get("align").setEnabled(c&&
f&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(c&&f&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(c);this.actions.get("selectEdges").setEnabled(c);this.actions.get("selectAll").setEnabled(c);this.actions.get("selectNone").setEnabled(c);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var c=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),f=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth,d=c?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 n=Math.max(0,Math.min(this.hsplitPosition,f-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 b=0;if(null!=this.sidebarFooterContainer){var e=
-this.footerHeight+k,b=Math.max(0,Math.min(d-q-e,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=n+"px";this.sidebarFooterContainer.style.height=b+"px";this.sidebarFooterContainer.style.bottom=e+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=n+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var g=this.getDiagramContainerOffset(),
-p=null!=this.hsplit.parentNode?n+this.splitSize:0;this.diagramContainer.style.left=p+g.x+"px";this.diagramContainer.style.top=q+g.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=n+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=p+"px");c?(this.menubarContainer.style.width=f+"px",
-this.toolbarContainer.style.width=this.menubarContainer.style.width,c=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=c-b+"px",this.formatContainer.style.height=c+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,f-n-this.splitSize-e)+"px":f+"px",this.footerContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,f-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 b=0;if(null!=this.sidebarFooterContainer){var e=
+this.footerHeight+k,b=Math.max(0,Math.min(d-q-e,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=b+"px";this.sidebarFooterContainer.style.bottom=e+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var g=this.getDiagramContainerOffset(),
+p=null!=this.hsplit.parentNode?m+this.splitSize:0;this.diagramContainer.style.left=p+g.x+"px";this.diagramContainer.style.top=q+g.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=p+"px");c?(this.menubarContainer.style.width=f+"px",
+this.toolbarContainer.style.width=this.menubarContainer.style.width,c=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=c-b+"px",this.formatContainer.style.height=c+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,f-m-this.splitSize-e)+"px":f+"px",this.footerContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",b-=this.tabContainer.clientHeight),this.diagramContainer.style.height=b+"px",this.hsplit.style.height=b+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=e+"px",f=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,f=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
this.footerHeight+b+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+f+"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"));
@@ -2347,13 +2347,13 @@ 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 c=document.createElement("div");c.className=a;return c};
-EditorUi.prototype.addSplitHandler=function(a,c,f,d){function k(a){if(null!=q){var l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,b+(c?l.x-q.x:q.y-l.y)-f));mxEvent.consume(a);b!=p()&&(e=!0,g=null)}}function n(a){k(a);q=b=null}var q=null,b=null,e=!0,g=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var p=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+f-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){q=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));b=p();e=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!e&&this.hsplitClickEnabled){var b=null!=g?g-f:0;g=p();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,n)})};
-EditorUi.prototype.handleError=function(a,c,f,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=c){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(c,k,n,f,null,null,null,null,null,null,null,null,d?f:null)}else null!=f&&f()};
-EditorUi.prototype.showError=function(a,c,f,d,k,n,q,b,e,g,p,m,l){a=new ErrorDialog(this,a,c,f||mxResources.get("ok"),d,k,n,q,m,b,e);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(a.container,g||340,p||100+20*c,!0,!1,l);a.init()};EditorUi.prototype.showDialog=function(a,c,f,d,k,n,q,b,e,g){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,f,d,k,n,q,b,e,g);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,c,f,d){function k(a){if(null!=q){var l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,b+(c?l.x-q.x:q.y-l.y)-f));mxEvent.consume(a);b!=p()&&(e=!0,g=null)}}function m(a){k(a);q=b=null}var q=null,b=null,e=!0,g=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var p=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+f-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){q=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));b=p();e=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!e&&this.hsplitClickEnabled){var b=null!=g?g-f:0;g=p();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})};
+EditorUi.prototype.handleError=function(a,c,f,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=c){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(c,k,m,f,null,null,null,null,null,null,null,null,d?f:null)}else null!=f&&f()};
+EditorUi.prototype.showError=function(a,c,f,d,k,m,q,b,e,g,p,n,l){a=new ErrorDialog(this,a,c,f||mxResources.get("ok"),d,k,m,q,n,b,e);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(a.container,g||340,p||100+20*c,!0,!1,l);a.init()};EditorUi.prototype.showDialog=function(a,c,f,d,k,m,q,b,e,g){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,f,d,k,m,q,b,e,g);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,c){if(null!=this.dialogs&&0<this.dialogs.length){var f=this.dialogs.pop();0==f.close(a,c)?this.dialogs.push(f):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():
-(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var c=a.getSelectionCells(),f=new mxDictionary,d=[],k=0;k<c.length;k++){var n=a.isTableCell(c[k])?a.model.getParent(c[k]):c[k];null==n||f.get(n)||(f.put(n,!0),d.push(n))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(q){this.handleError(q)}};
-EditorUi.prototype.pickColor=function(a,c){var f=this.editor.graph,d=f.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,a||"none",function(a){f.cellEditor.restoreSelection(d);c(a)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(n.container,230,k,!0,!1);n.init()};
+(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var c=a.getSelectionCells(),f=new mxDictionary,d=[],k=0;k<c.length;k++){var m=a.isTableCell(c[k])?a.model.getParent(c[k]):c[k];null==m||f.get(m)||(f.put(m,!0),d.push(m))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(q){this.handleError(q)}};
+EditorUi.prototype.pickColor=function(a,c){var f=this.editor.graph,d=f.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){f.cellEditor.restoreSelection(d);c(a)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(m.container,230,k,!0,!1);m.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>f&&(c=a.substring(f,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(k){}return c};
EditorUi.prototype.extractGraphModelFromEvent=function(a){var c=null,f=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?f=a.getData("Text"):(f=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==f||0==f.length)&&(f=a.getData("text/plain"))),null!=f&&(f=Graph.zapGremlins(mxUtils.trim(f)),a=this.extractGraphModelFromHtml(f),null!=a&&(f=a))));null!=f&&this.isCompatibleString(f)&&
@@ -2361,18 +2361,18 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var c=null,f=null;null
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,c);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(c.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(c))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(c);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(f){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
EditorUi.prototype.executeLayout=function(a,c,f){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(d.getModel().endUpdate(),null!=f&&f())}}};
-EditorUi.prototype.showImageDialog=function(a,c,f,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),n=mxUtils.prompt(a,c);d.restoreSelection(k);if(null!=n&&0<n.length){var q=new Image;q.onload=function(){f(n,q.width,q.height)};q.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=n}else f(null)};EditorUi.prototype.showLinkDialog=function(a,c,f){a=new LinkDialog(this,a,c,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.showImageDialog=function(a,c,f,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),m=mxUtils.prompt(a,c);d.restoreSelection(k);if(null!=m&&0<m.length){var q=new Image;q.onload=function(){f(m,q.width,q.height)};q.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=m}else f(null)};EditorUi.prototype.showLinkDialog=function(a,c,f){a=new LinkDialog(this,a,c,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
EditorUi.prototype.showBackgroundImageDialog=function(a,c){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 f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=c?c.src:"");null!=f&&0<f.length?(c=new Image,c.onload=function(){a(new mxImage(f,c.width,c.height),!1)},c.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},c.src=f):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,c,f){mxUtils.confirm(a)?null!=c&&c():null!=f&&f()};
EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);c.border=20;mxEvent.addListener(window,"resize",function(){c.update()});this.addListener("pageFormatChanged",function(){c.update()});return c};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
EditorUi.prototype.createKeyHandler=function(a){function c(a,e,c){q.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(e=null!=e?e:1,c){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),g=0;g<b.length;g++)if(d.getModel().isVertex(b[g])&&d.isCellResizable(b[g])){var f=d.getCellGeometry(b[g]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-e):38==a?f.height=Math.max(0,f.height-e):39==a?f.width+=e:40==a&&(f.height+=e),d.getModel().setGeometry(b[g],f))}}finally{d.getModel().endUpdate()}}else{var p=
d.getSelectionCell(),f=d.model.getParent(p),b=null;1==d.getSelectionCount()&&d.model.isVertex(p)&&null!=d.layoutManager&&!d.isCellLocked(p)&&(b=d.layoutManager.getLayout(f));if(null!=b&&b.constructor==mxStackLayout)b=f.getIndex(p),37==a||38==a?d.model.add(f,p,Math.max(0,b-1)):39!=a&&40!=a||d.model.add(f,p,Math.min(d.model.getChildCount(f),b+1));else{b=d.getMovableCells(d.getSelectionCells());p=[];for(g=0;g<b.length;g++)f=d.getCurrentCellStyle(b[g]),"1"==mxUtils.getValue(f,"part","0")?(f=d.model.getParent(b[g]),
-d.model.isVertex(f)&&0>mxUtils.indexOf(b,f)&&p.push(f)):p.push(b[g]);0<p.length&&(b=f=0,37==a?f=-e:38==a?b=-e:39==a?f=e:40==a&&(b=e),d.moveCells(p,f,b))}}});null!=b&&window.clearTimeout(b);b=window.setTimeout(function(){if(0<q.length){d.getModel().beginUpdate();try{for(var a=0;a<q.length;a++)q[a]();q=[]}finally{d.getModel().endUpdate()}}},200)}var f=this,d=this.editor.graph,k=new mxKeyHandler(d),n=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
-mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],b=
+d.model.isVertex(f)&&0>mxUtils.indexOf(b,f)&&p.push(f)):p.push(b[g]);0<p.length&&(b=f=0,37==a?f=-e:38==a?b=-e:39==a?f=e:40==a&&(b=e),d.moveCells(p,f,b))}}});null!=b&&window.clearTimeout(b);b=window.setTimeout(function(){if(0<q.length){d.getModel().beginUpdate();try{for(var a=0;a<q.length;a++)q[a]();q=[]}finally{d.getModel().endUpdate()}}},200)}var f=this,d=this.editor.graph,k=new mxKeyHandler(d),m=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
+mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&m.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],b=
null,e={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},g=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var b=f.actions.get(f.altShiftActions[a.keyCode]);if(null!=b)return b.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return d.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:
function(){d.selectChildCell()};if(null!=e[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var b=d.connectVertex(d.getSelectionCell(),e[a.keyCode],d.defaultEdgeLength,a,!0);null!=b&&0<b.length&&(1==b.length&&d.model.isEdge(b[0])?d.setSelectionCell(d.model.getTerminal(b[0],!1)):d.setSelectionCell(b[b.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?
-function(){c(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return g.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,b,e,d){var c=this.actions.get(e);null!=c&&(e=function(){c.isEnabled()&&c.funct()},b?d?k.bindControlShiftKey(a,e):k.bindControlKey(a,e):d?k.bindShiftKey(a,e):k.bindKey(a,e))});var p=this,m=k.escape;k.escape=function(a){m.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});
+function(){c(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return g.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,b,e,d){var c=this.actions.get(e);null!=c&&(e=function(){c.isEnabled()&&c.funct()},b?d?k.bindControlShiftKey(a,e):k.bindControlKey(a,e):d?k.bindShiftKey(a,e):k.bindKey(a,e))});var p=this,n=k.escape;k.escape=function(a){n.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});
k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindShiftKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){p.ctrlEnter()}),k.bindAction(8,!1,"delete"),
k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(36,!1,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,
!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),
@@ -2384,30 +2384,30 @@ Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&(
mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(c){}})();
mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;
mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,c,f){return null};
-Graph=function(a,c,f,d,k,n){mxGraph.call(this,a,c,f,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=a.indexOf("/",c+2),0<c&&(this.domainUrl=a.substring(0,c)),c=a.lastIndexOf("/"),0<c&&(this.domainPathUrl=a.substring(0,c+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
+Graph=function(a,c,f,d,k,m){mxGraph.call(this,a,c,f,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=a.indexOf("/",c+2),0<c&&(this.domainUrl=a.substring(0,c)),c=a.lastIndexOf("/"),0<c&&(this.domainPathUrl=a.substring(0,c+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var q=null,b=null,e=null,g=null,p=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var c=d.getProperty("event"),f=c.getState();if(!mxEvent.isAltDown(c.getEvent())&&null!=f)if(this.model.isEdge(f.cell))if(q=new mxPoint(c.getGraphX(),c.getGraphY()),p=this.isCellSelected(f.cell),e=f,b=c,null!=f.text&&null!=f.text.boundingBox&&
-mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var m=this.selectionCellsHandler.getHandler(f.cell);null!=m&&null!=m.bends&&0<m.bends.length&&(g=m.getHandleForEvent(c))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(c.getEvent())&&(m=this.selectionCellsHandler.getHandler(f.cell),null==m||null==m.getHandleForEvent(c))){var u=new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);u.grow(mxEvent.isTouchEvent(c.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var l=this.model.getParent(f.cell),m=this.model.getParent(l);if(!this.isCellSelected(m)&&(mxUtils.intersects(u,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(m,0)!=l||mxUtils.intersects(u,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(u,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(l,0)!=f.cell||mxUtils.intersects(u,new mxRectangle(f.x+f.width-
-2,f.y,2,f.height)))&&(l=this.selectionCellsHandler.isHandled(m),this.selectCellForEvent(m,c.getEvent()),m=this.selectionCellsHandler.getHandler(m),null!=m)){var t=m.getHandleForEvent(c);null!=t&&(m.start(c.getGraphX(),c.getGraphY(),t),m.blockDelayedSelection=!l,c.consume())}}for(;!c.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(m=this.getActualStartSize(f.cell),l=this.view.scale,(0<m.x||0<m.width)&&mxUtils.intersects(u,
-new mxRectangle(f.x+(m.x-m.width-1)*l+(0==m.x?f.width:0),f.y,1,f.height))||(0<m.y||0<m.height)&&mxUtils.intersects(u,new mxRectangle(f.x,f.y+(m.y-m.height-1)*l+(0==m.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,c.getEvent()),m=this.selectionCellsHandler.getHandler(f.cell),null!=m&&(t=mxEvent.CUSTOM_HANDLE-m.customHandles.length+1,m.start(c.getGraphX(),c.getGraphY(),t),c.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(a,b){},
-mouseMove:mxUtils.bind(this,function(a,d){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(f=this.tolerance,null!=q&&null!=e&&null!=b){if(c=e,Math.abs(q.x-d.getGraphX())>f||Math.abs(q.y-d.getGraphY())>f){this.isCellSelected(c.cell)||this.selectCellForEvent(c.cell,d.getEvent());var m=this.selectionCellsHandler.getHandler(c.cell);if(null!=m&&null!=m.bends&&0<m.bends.length){f=
-m.getHandleForEvent(b);var u=this.view.getEdgeStyle(c),l=u==mxEdgeStyle.EntityRelation;p||g!=mxEvent.LABEL_HANDLE||(f=g);if(l&&0!=f&&f!=m.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=c.visibleSourceState||f==m.bends.length-1||null!=c.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=c.absolutePoints,null!=l&&(null==u&&null==f||u==mxEdgeStyle.OrthConnector)&&(f=
-g,null==f&&(f=new mxRectangle(q.x,q.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=m.bends.length-1:null!=u&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(c,q.x,q.y),f=null==u?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),m.start(d.getGraphX(),
-d.getGraphX(),f),g=q=b=e=null,p=!1,d.consume(),this.graphHandler.reset()}}}else if(c=d.getState(),null!=c){m=null;if(this.model.isEdge(c.cell)){if(f=new mxRectangle(d.getGraphX(),d.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=c.absolutePoints,null!=l)if(null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,d.getGraphX(),d.getGraphY()))m="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))m="pointer";else if(null!=
-c.visibleSourceState||null!=c.visibleTargetState)f=this.view.getEdgeStyle(c),m="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(f=mxUtils.findNearestSegment(c,d.getGraphX(),d.getGraphY()),f<l.length-1&&0<=f&&(m=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){f=new mxRectangle(d.getGraphX()-1,d.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(c.cell)&&(l=this.model.getParent(c.cell),u=this.model.getParent(l),
-!this.isCellSelected(u)))if(mxUtils.intersects(f,new mxRectangle(c.x-2,c.y,2,c.height))&&this.model.getChildAt(l,0)!=c.cell||mxUtils.intersects(f,new mxRectangle(c.x+c.width-2,c.y,2,c.height)))m="col-resize";else if(mxUtils.intersects(f,new mxRectangle(c.x,c.y-2,c.width,3))&&this.model.getChildAt(u,0)!=l||mxUtils.intersects(f,new mxRectangle(c.x,c.y+c.height-2,c.width,3)))m="row-resize";for(l=c;null==m&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var u=
-this.getActualStartSize(l.cell),t=this.view.scale;(0<u.x||0<u.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(u.x-u.width-1)*t+(0==u.x?l.width*t:0),l.y,1,l.height))?m="col-resize":(0<u.y||0<u.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(u.y-u.height-1)*t+(0==u.y?l.height:0),l.width,1))&&(m="row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=m&&c.setCursor(m)}}),mouseUp:mxUtils.bind(this,function(a,d){g=q=b=e=null})})}this.cellRenderer.getLabelValue=function(a){var b=
+mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var n=this.selectionCellsHandler.getHandler(f.cell);null!=n&&null!=n.bends&&0<n.bends.length&&(g=n.getHandleForEvent(c))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(c.getEvent())&&(n=this.selectionCellsHandler.getHandler(f.cell),null==n||null==n.getHandleForEvent(c))){var u=new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);u.grow(mxEvent.isTouchEvent(c.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var l=this.model.getParent(f.cell),n=this.model.getParent(l);if(!this.isCellSelected(n)&&(mxUtils.intersects(u,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(n,0)!=l||mxUtils.intersects(u,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(u,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(l,0)!=f.cell||mxUtils.intersects(u,new mxRectangle(f.x+f.width-
+2,f.y,2,f.height)))&&(l=this.selectionCellsHandler.isHandled(n),this.selectCellForEvent(n,c.getEvent()),n=this.selectionCellsHandler.getHandler(n),null!=n)){var t=n.getHandleForEvent(c);null!=t&&(n.start(c.getGraphX(),c.getGraphY(),t),n.blockDelayedSelection=!l,c.consume())}}for(;!c.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(n=this.getActualStartSize(f.cell),l=this.view.scale,(0<n.x||0<n.width)&&mxUtils.intersects(u,
+new mxRectangle(f.x+(n.x-n.width-1)*l+(0==n.x?f.width:0),f.y,1,f.height))||(0<n.y||0<n.height)&&mxUtils.intersects(u,new mxRectangle(f.x,f.y+(n.y-n.height-1)*l+(0==n.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,c.getEvent()),n=this.selectionCellsHandler.getHandler(f.cell),null!=n&&(t=mxEvent.CUSTOM_HANDLE-n.customHandles.length+1,n.start(c.getGraphX(),c.getGraphY(),t),c.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(a,b){},
+mouseMove:mxUtils.bind(this,function(a,d){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(f=this.tolerance,null!=q&&null!=e&&null!=b){if(c=e,Math.abs(q.x-d.getGraphX())>f||Math.abs(q.y-d.getGraphY())>f){this.isCellSelected(c.cell)||this.selectCellForEvent(c.cell,d.getEvent());var n=this.selectionCellsHandler.getHandler(c.cell);if(null!=n&&null!=n.bends&&0<n.bends.length){f=
+n.getHandleForEvent(b);var u=this.view.getEdgeStyle(c),l=u==mxEdgeStyle.EntityRelation;p||g!=mxEvent.LABEL_HANDLE||(f=g);if(l&&0!=f&&f!=n.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=c.visibleSourceState||f==n.bends.length-1||null!=c.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=c.absolutePoints,null!=l&&(null==u&&null==f||u==mxEdgeStyle.OrthConnector)&&(f=
+g,null==f&&(f=new mxRectangle(q.x,q.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=n.bends.length-1:null!=u&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(c,q.x,q.y),f=null==u?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),n.start(d.getGraphX(),
+d.getGraphX(),f),g=q=b=e=null,p=!1,d.consume(),this.graphHandler.reset()}}}else if(c=d.getState(),null!=c){n=null;if(this.model.isEdge(c.cell)){if(f=new mxRectangle(d.getGraphX(),d.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=c.absolutePoints,null!=l)if(null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,d.getGraphX(),d.getGraphY()))n="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))n="pointer";else if(null!=
+c.visibleSourceState||null!=c.visibleTargetState)f=this.view.getEdgeStyle(c),n="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(f=mxUtils.findNearestSegment(c,d.getGraphX(),d.getGraphY()),f<l.length-1&&0<=f&&(n=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){f=new mxRectangle(d.getGraphX()-1,d.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(c.cell)&&(l=this.model.getParent(c.cell),u=this.model.getParent(l),
+!this.isCellSelected(u)))if(mxUtils.intersects(f,new mxRectangle(c.x-2,c.y,2,c.height))&&this.model.getChildAt(l,0)!=c.cell||mxUtils.intersects(f,new mxRectangle(c.x+c.width-2,c.y,2,c.height)))n="col-resize";else if(mxUtils.intersects(f,new mxRectangle(c.x,c.y-2,c.width,3))&&this.model.getChildAt(u,0)!=l||mxUtils.intersects(f,new mxRectangle(c.x,c.y+c.height-2,c.width,3)))n="row-resize";for(l=c;null==n&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var u=
+this.getActualStartSize(l.cell),t=this.view.scale;(0<u.x||0<u.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(u.x-u.width-1)*t+(0==u.x?l.width*t:0),l.y,1,l.height))?n="col-resize":(0<u.y||0<u.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(u.y-u.height-1)*t+(0==u.y?l.height:0),l.width,1))&&(n="row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=n&&c.setCursor(n)}}),mouseUp:mxUtils.bind(this,function(a,d){g=q=b=e=null})})}this.cellRenderer.getLabelValue=function(a){var b=
mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};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,b){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],e=this.graph.pageFormat,d=this.graph.pageScale,c=e.width*d,e=e.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),
-p=0;p<g.width;p++)b.push(new mxRectangle(((g.x+p)*c+d.x)*f,(g.y*e+d.y)*f,c*f,e*f));for(p=1;p<g.height;p++)b.push(new mxRectangle((g.x*c+d.x)*f,((g.y+p)*e+d.y)*f,c*f,e*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;
+!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],e=this.graph.pageFormat,d=this.graph.pageScale,c=e.width*d,e=e.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),
+l=0;l<g.width;l++)b.push(new mxRectangle(((g.x+l)*c+d.x)*f,(g.y*e+d.y)*f,c*f,e*f));for(l=1;l<g.height;l++)b.push(new mxRectangle((g.x*c+d.x)*f,((g.y+l)*e+d.y)*f,c*f,e*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;
return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=l.apply(this,arguments),e=new mxDictionary,d=[],c=0;c<b.length;c++){var f=this.graph.isTableCell(a)&&this.graph.isTableCell(b[c])&&this.graph.isCellSelected(b[c])?this.graph.model.getParent(b[c]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[c])&&this.graph.isCellSelected(b[c])?b[c]:this.graph.getCompositeParent(b[c]);null==f||e.get(f)||(e.put(f,
-!0),d.push(f))}return d};var v=this.graphHandler.start;this.graphHandler.start=function(a,b,e,d){var c=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?c=!0:a=this.graph.model.getParent(a));c||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);
-this.getRubberband=function(){return t};var y=(new Date).getTime(),x=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var A=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&A.apply(this,arguments)};var C=this.isToggleEvent;this.isToggleEvent=function(a){return C.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var z=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return z.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
+!0),d.push(f))}return d};var x=this.graphHandler.start;this.graphHandler.start=function(a,b,e,d){var c=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?c=!0:a=this.graph.model.getParent(a));c||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);
+this.getRubberband=function(){return t};var y=(new Date).getTime(),v=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(y=(new Date).getTime(),v=0):v=(new Date).getTime()-y};var z=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<v||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&z.apply(this,arguments)};var C=this.isToggleEvent;this.isToggleEvent=function(a){return C.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return A.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=
function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return G.apply(this,arguments);var e=b?a.sourceState.cell:a.getCell();null!=e&&(e=this.getClickableLinkForCell(e),null!=e&&(this.isCustomLink(e)?this.customLinkClicked(e):this.openLink(e)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=
a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var F=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.apply(this,arguments)};this.selectRegion=function(a,b){var e=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(e,b);return e};this.getAllCells=function(a,
-b,e,d,c,f){f=null!=f?f:[];if(0<e||0<d){var g=this.getModel(),m=a+e,p=b+d;null==c&&(c=this.getCurrentRoot(),null==c&&(c=g.getRoot()));if(null!=c)for(var l=g.getChildCount(c),u=0;u<l;u++){var t=g.getChildAt(c,u),B=this.view.getState(t);if(null!=B&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(B.style,"locked","0")){var k=mxUtils.getValue(B.style,mxConstants.STYLE_ROTATION)||0;0!=k&&(B=mxUtils.getBoundingBox(B,k));(g.isEdge(t)||g.isVertex(t))&&B.x>=a&&B.y+B.height<=p&&B.y>=b&&B.x+B.width<=m&&f.push(t);
+b,e,d,c,f){f=null!=f?f:[];if(0<e||0<d){var g=this.getModel(),n=a+e,l=b+d;null==c&&(c=this.getCurrentRoot(),null==c&&(c=g.getRoot()));if(null!=c)for(var p=g.getChildCount(c),u=0;u<p;u++){var t=g.getChildAt(c,u),B=this.view.getState(t);if(null!=B&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(B.style,"locked","0")){var k=mxUtils.getValue(B.style,mxConstants.STYLE_ROTATION)||0;0!=k&&(B=mxUtils.getBoundingBox(B,k));(g.isEdge(t)||g.isVertex(t))&&B.x>=a&&B.y+B.height<=l&&B.y>=b&&B.x+B.width<=n&&f.push(t);
this.getAllCells(a,b,e,d,t,f)}}}return f};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,e){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var J=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==
b.getProperty("eventName")){var e=b.getProperty("event").getState();J=null==e||this.isSelectionEmpty()||this.isCellSelected(e.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var e=b.getProperty("event"),d=b.getProperty("cell");null==d?(e=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),t.start(e.x,e.y)):null!=J?this.addSelectionCells(J):1<this.getSelectionCount()&&this.isCellSelected(d)&&
this.removeSelectionCell(d);J=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var e=a.view.graph;return b&&(e.isCellSelected(a.cell)||e.isTableRow(a.cell)&&e.selectionCellsHandler.isHandled(e.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,
@@ -2421,21 +2421,21 @@ Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((
Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;
Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];
Graph.prototype.standalone=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,c=!0,n=null,q=mxUtils.bind(this,function(a){c=!0;n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),b=mxUtils.bind(this,function(a){c=c&&null!=n&&Math.abs(n.x-mxEvent.getClientX(a))<d&&Math.abs(n.y-mxEvent.getClientY(a))<d}),e=mxUtils.bind(this,function(b){if(c)for(var e=mxEvent.getSource(b);null!=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,c=!0,m=null,q=mxUtils.bind(this,function(a){c=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),b=mxUtils.bind(this,function(a){c=c&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<d&&Math.abs(m.y-mxEvent.getClientY(a))<d}),e=mxUtils.bind(this,function(b){if(c)for(var e=mxEvent.getSource(b);null!=
e&&e!=f.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,b);break}e=e.parentNode}});mxEvent.addGestureListeners(f.node,q,b,e);mxEvent.addListener(f.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getCells=function(a,c){a=null!=a?a:!0;c=null!=c?c:!0;var d=this.model;return d.filterDescendants(function(f){return a&&d.isVertex(f)||c&&d.isEdge(f)},d.getRoot())};Graph.prototype.getStartEditingCell=function(a,c){var d=this.getCellStyle(a),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(a)&&(!this.isSwimlane(a)||0==d)&&""==this.getLabel(a)&&
0<this.model.getChildCount(a)&&(a=this.model.getChildAt(a,0),d=this.getCellStyle(a),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(a)&&(!this.isSwimlane(a)||0==d)&&""==this.getLabel(a)&&0<this.model.getChildCount(a))for(d=0;d<this.model.getChildCount(a);d++){var f=this.model.getChildAt(a,d);if(this.isCellEditable(f)){a=f;break}}return a};Graph.prototype.copyStyle=function(a){var c=null;if(null!=a){c=mxUtils.clone(this.getCurrentCellStyle(a));a=this.model.getStyle(a);
a=null!=a?a.split(";"):[];for(var d=0;d<a.length;d++){var f=a[d],b=f.indexOf("=");if(0<=b){var e=f.substring(0,b),f=f.substring(b+1);null==c[e]&&f==mxConstants.NONE&&(c[e]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(a,c,f){f=null!=f?f:Graph.pasteStyles;this.model.beginUpdate();try{for(var d=0;d<c.length;d++)for(var b=this.getCurrentCellStyle(c[d]),e=0;e<f.length;e++){var g=b[f[e]],p=a[f[e]];g==p||null==g&&p==mxConstants.NONE||this.setCellStyles(f[e],p,[c[d]])}}finally{this.model.endUpdate()}};
Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,c,f,q,b,e){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,
-arguments)};Graph.prototype.getScaledCellAt=function(a,c,f,q,b,e){q=null!=q?q:!0;b=null!=b?b:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var d=this.model.getChildCount(f)-1;0<=d;d--){var p=this.model.getChildAt(f,d),m=this.getScaledCellAt(a,c,p,q,b,e);if(null!=m)return m;if(this.isCellVisible(p)&&(b&&this.model.isEdge(p)||q&&this.model.isVertex(p))&&(m=this.view.getState(p),null!=m&&(null==e||!e(m,a,c))&&this.intersects(m,a,c)))return p}return null};
+arguments)};Graph.prototype.getScaledCellAt=function(a,c,f,q,b,e){q=null!=q?q:!0;b=null!=b?b:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var d=this.model.getChildCount(f)-1;0<=d;d--){var p=this.model.getChildAt(f,d),n=this.getScaledCellAt(a,c,p,q,b,e);if(null!=n)return n;if(this.isCellVisible(p)&&(b&&this.model.isEdge(p)||q&&this.model.isVertex(p))&&(n=this.view.getState(p),null!=n&&(null==e||!e(n,a,c))&&this.intersects(n,a,c)))return p}return null};
Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")||this.isTableCell(a)||this.isTableRow(a)};Graph.prototype.getCompositeParent=function(a){for(;this.isPart(a);){var c=this.model.getParent(a);
if(!this.model.isVertex(c))break;a=c}return a};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,f=this.graph.currentScale,a=new mxRectangle((a.x+c.x)*f,(a.y+c.y)*f,a.width*f,a.height*f);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?
this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(c){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,
this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var c=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var f=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+f+","+f+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(c!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var q=
-a.style.display;a.style.display="none";a.getBBox();a.style.display=q}}catch(b){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var c=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,f=this.scale,n=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);c.apply(this,arguments);a&&(this.scale=f,this.translate=n)};var f=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(a,c,n){var d=this.useCssTransforms,b=this.view.scale,e=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);d&&(this.view.scale=b,this.view.translate=e,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+a.style.display;a.style.display="none";a.getBBox();a.style.display=q}}catch(b){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var c=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,f=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);c.apply(this,arguments);a&&(this.scale=f,this.translate=m)};var f=mxGraph.prototype.updatePageBreaks;
+mxGraph.prototype.updatePageBreaks=function(a,c,m){var d=this.useCssTransforms,b=this.view.scale,e=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);d&&(this.view.scale=b,this.view.translate=e,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,c,f){c=c.getAttribute("href");if(null!=c&&!this.isCustomLink(c)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(c)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(c),a);mxEvent.consume(f)}};
-Graph.prototype.openLink=function(a,c,f){var d=window;try{if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,null!=c?c:"_blank"),null==d||f||(d.opener=null)}catch(n){}return d};
+Graph.prototype.openLink=function(a,c,f){var d=window;try{if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,null!=c?c:"_blank"),null==d||f||(d.opener=null)}catch(m){}return d};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a,c){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,c){var f=this.graph.model.getParent(a);if(c!=mxEvent.BEGIN_UPDATE||this.hasLayout(f,c)){f=this.graph.getCellStyle(a);if("stackLayout"==f.childLayout){var d=new mxStackLayout(this.graph,!0);d.resizeParentMax="1"==mxUtils.getValue(f,"resizeParentMax","1");d.horizontal="1"==mxUtils.getValue(f,
@@ -2450,36 +2450,36 @@ Graph.prototype.isSplitTarget=function(a,c,f){return!this.model.isEdge(c[0])&&!m
Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(c,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getClickableLinkForCell=function(a){do{var c=this.getLinkForCell(a);if(null!=c)return c;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,q=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),f=!0);var b=f?"getUTC":"get",e=a[b+"Date"](),g=a[b+"Day"](),p=a[b+"Month"](),m=a[b+"FullYear"](),l=a[b+"Hours"](),v=a[b+"Minutes"](),t=a[b+"Seconds"](),b=a[b+"Milliseconds"](),y=f?0:a.getTimezoneOffset(),x={d:e,dd:q(e),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:p+1,mm:q(p+1),mmm:d.i18n.monthNames[p],mmmm:d.i18n.monthNames[p+
-12],yy:String(m).slice(2),yyyy:m,h:l%12||12,hh:q(l%12||12),H:l,HH:q(l),M:v,MM:q(v),s:t,ss:q(t),l:q(b,3),L:q(99<b?Math.round(b/10):b),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(n,""),o:(0<y?"-":"+")+q(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<e%10?0:(10!=e%100-e%10)*e%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,q=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),f=!0);var b=f?"getUTC":"get",e=a[b+"Date"](),g=a[b+"Day"](),p=a[b+"Month"](),n=a[b+"FullYear"](),l=a[b+"Hours"](),x=a[b+"Minutes"](),t=a[b+"Seconds"](),b=a[b+"Milliseconds"](),y=f?0:a.getTimezoneOffset(),v={d:e,dd:q(e),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:p+1,mm:q(p+1),mmm:d.i18n.monthNames[p],mmmm:d.i18n.monthNames[p+
+12],yy:String(n).slice(2),yyyy:n,h:l%12||12,hh:q(l%12||12),H:l,HH:q(l),M:x,MM:q(x),s:t,ss:q(t),l:q(b,3),L:q(99<b?Math.round(b/10):b),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<y?"-":"+")+q(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<e%10?0:(10!=e%100-e%10)*e%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in v?v[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),f=c.getChildCount(c.root),d=0;d<f;d++)mxUtils.bind(this,function(d){var f=document.createElement("div");f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.padding="2px";f.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");c.isVisible(d)&&(k.setAttribute("checked","checked"),
k.defaultChecked=!0);f.appendChild(k);var b=this.convertValueToString(d)||mxResources.get("background")||"Background";f.setAttribute("title",b);mxUtils.write(f,b);a.appendChild(f);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");c.setVisible(d,k.checked)})})(c.getChildAt(c.root,d));return a};
-Graph.prototype.replacePlaceholders=function(a,c){var f=[];if(null!=c){for(var d=0;match=this.placeholderPattern.exec(c);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var n=null;if(match.index>d&&"%"==c.charAt(match.index-1))n=k.substring(1);else{var q=k.substring(1,k.length-1);if("id"==q)n=a.id;else if(0>q.indexOf("{"))for(var b=a;null==n&&null!=b;)null!=b.value&&"object"==typeof b.value&&(n=b.hasAttribute(q)?null!=b.getAttribute(q)?b.getAttribute(q):"":null),b=this.model.getParent(b);
-null==n&&(n=this.getGlobalVariable(q))}f.push(c.substring(d,match.index)+(null!=n?n:k));d=match.index+k.length}}f.push(c.substring(d))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var c=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&c.push(d)}this.setSelectionCells(c)}else this.clearSelection()};
+Graph.prototype.replacePlaceholders=function(a,c){var f=[];if(null!=c){for(var d=0;match=this.placeholderPattern.exec(c);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var m=null;if(match.index>d&&"%"==c.charAt(match.index-1))m=k.substring(1);else{var q=k.substring(1,k.length-1);if("id"==q)m=a.id;else if(0>q.indexOf("{"))for(var b=a;null==m&&null!=b;)null!=b.value&&"object"==typeof b.value&&(m=b.hasAttribute(q)?null!=b.getAttribute(q)?b.getAttribute(q):"":null),b=this.model.getParent(b);
+null==m&&(m=this.getGlobalVariable(q))}f.push(c.substring(d,match.index)+(null!=m?m:k));d=match.index+k.length}}f.push(c.substring(d))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var c=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&c.push(d)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,c,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=f&&(mxEvent.isTouchEvent(c)?f.update(f.getState(this.view.getState(a[1]))):f.reset())):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,c,f,d,k,n,q,b){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];n=n?n:!1;var e=this.getCompositeParent(a),g=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(e.geometry.x,e.geometry.y);c==mxConstants.DIRECTION_NORTH?(g.x+=e.geometry.width/2,g.y-=f):c==mxConstants.DIRECTION_SOUTH?(g.x+=e.geometry.width/2,g.y+=e.geometry.height+f):(g.x=c==mxConstants.DIRECTION_WEST?
-g.x-f:g.x+(e.geometry.width+f),g.y+=e.geometry.height/2);var p=this.view.getState(this.model.getParent(a));f=this.view.scale;var m=this.view.translate,e=m.x*f,m=m.y*f;null!=p&&this.model.isVertex(p.cell)&&(e=p.x,m=p.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(g.x+=a.parent.geometry.x,g.y+=a.parent.geometry.y);var l=n?null:this.getCellAt(e+g.x*f,m+g.y*f),v=!1;null!=l&&this.model.isAncestor(l,a)&&(v=!0,l=null);for(n=l;null!=n;){if(this.isCellLocked(n)){l=null;break}n=this.model.getParent(n)}null!=
-l&&(n=this.view.getState(a),p=this.view.getState(l),null!=n&&null!=p&&mxUtils.intersects(n,p)&&(l=null));var t=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;t&&(c==mxConstants.DIRECTION_NORTH?g.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?g.y+=a.geometry.height/2:g.x=c==mxConstants.DIRECTION_WEST?g.x-a.geometry.width/2:g.x+a.geometry.width/2);null==l||this.isCellConnectable(l)||this.isSwimlane(l)||(k=this.getModel().getParent(l),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&
-(l=k));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l)&&!this.isSwimlane(l))l=null;var y=[],x=null!=l&&this.isSwimlane(l),D=x?null:l;k=mxUtils.bind(this,function(e){if(null==q||null!=e){this.model.beginUpdate();try{if(null==D&&t){for(var f=null!=e?e:a,m=this.getCellGeometry(f);null!=m&&m.relative;)f=this.getModel().getParent(f),m=this.getCellGeometry(f);f=this.getCompositeParent(f);D=null!=e?e:this.duplicateCells([f],!1)[0];null!=e&&this.addCells([D],this.model.getParent(a),null,null,null,
-!0);m=this.getCellGeometry(D);null!=m&&(m.x=g.x-m.width/2,m.y=g.y-m.height/2);x?(this.addCells([D],l,null,null,null,!0),l=null):t&&null==l&&!v&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&t||null==l&&null!=e&&e.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,D,this.createCurrentEdgeStyle());if(null!=p&&
+Graph.prototype.connectVertex=function(a,c,f,d,k,m,q,b){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var e=this.getCompositeParent(a),g=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(e.geometry.x,e.geometry.y);c==mxConstants.DIRECTION_NORTH?(g.x+=e.geometry.width/2,g.y-=f):c==mxConstants.DIRECTION_SOUTH?(g.x+=e.geometry.width/2,g.y+=e.geometry.height+f):(g.x=c==mxConstants.DIRECTION_WEST?
+g.x-f:g.x+(e.geometry.width+f),g.y+=e.geometry.height/2);var p=this.view.getState(this.model.getParent(a));f=this.view.scale;var n=this.view.translate,e=n.x*f,n=n.y*f;null!=p&&this.model.isVertex(p.cell)&&(e=p.x,n=p.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(g.x+=a.parent.geometry.x,g.y+=a.parent.geometry.y);var l=m?null:this.getCellAt(e+g.x*f,n+g.y*f),x=!1;null!=l&&this.model.isAncestor(l,a)&&(x=!0,l=null);for(m=l;null!=m;){if(this.isCellLocked(m)){l=null;break}m=this.model.getParent(m)}null!=
+l&&(m=this.view.getState(a),p=this.view.getState(l),null!=m&&null!=p&&mxUtils.intersects(m,p)&&(l=null));var t=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;t&&(c==mxConstants.DIRECTION_NORTH?g.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?g.y+=a.geometry.height/2:g.x=c==mxConstants.DIRECTION_WEST?g.x-a.geometry.width/2:g.x+a.geometry.width/2);null==l||this.isCellConnectable(l)||this.isSwimlane(l)||(k=this.getModel().getParent(l),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&
+(l=k));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l)&&!this.isSwimlane(l))l=null;var y=[],v=null!=l&&this.isSwimlane(l),D=v?null:l;k=mxUtils.bind(this,function(e){if(null==q||null!=e){this.model.beginUpdate();try{if(null==D&&t){for(var f=null!=e?e:a,n=this.getCellGeometry(f);null!=n&&n.relative;)f=this.getModel().getParent(f),n=this.getCellGeometry(f);f=this.getCompositeParent(f);D=null!=e?e:this.duplicateCells([f],!1)[0];null!=e&&this.addCells([D],this.model.getParent(a),null,null,null,
+!0);n=this.getCellGeometry(D);null!=n&&(n.x=g.x-n.width/2,n.y=g.y-n.height/2);v?(this.addCells([D],l,null,null,null,!0),l=null):t&&null==l&&!x&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&t||null==l&&null!=e&&e.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,D,this.createCurrentEdgeStyle());if(null!=p&&
this.connectionHandler.insertBeforeSource){for(var k=null,f=a;null!=f.parent&&null!=f.geometry&&f.geometry.relative&&f.parent!=p.parent;)f=this.model.getParent(f);null!=f&&null!=f.parent&&f.parent==p.parent&&(k=f.parent.getIndex(f),this.model.add(f.parent,p,k))}null==l&&null!=D&&null!=e&&null!=a.parent&&e.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),this.model.add(a.parent,D,k));null!=p&&y.push(p);null==l&&null!=D&&y.push(D);null==D&&null!=p&&p.geometry.setTerminalPoint(g,
-!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=b)b(y);else return y});if(null!=q&&null==D&&t)q(e+g.x*f,m+g.y*f,k);else return k()};
+!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=b)b(y);else return y});if(null!=q&&null==D&&t)q(e+g.x*f,n+g.y*f,k);else return k()};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],f,d;for(d in this.model.cells)if(f=this.model.cells[d],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(a.innerHTML=this.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([a])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&c.push(f);return c.join(" ")};
Graph.prototype.convertValueToString=function(a){var c=this.model.getValue(a);if(null!=c&&"object"==typeof c){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),f=a,d=null;null==d&&null!=f;)null!=f.value&&"object"==typeof f.value&&(d=f.hasAttribute(c)?null!=f.getAttribute(c)?f.getAttribute(c):"":null),f=this.model.getParent(f);return d||""}return c.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 c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!f.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(a,c,f){if(null!=a&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,c){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(c.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,c,f,d,k){c=null!=c?c:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<f.length;n++){var q=this.view.getState(f[n]),b=this.getCellGeometry(f[n]);if(null!=q&&null!=b){var e=Math.round(b.width-q.width/this.view.scale),g=Math.round(b.height-q.height/this.view.scale);if(0!=g||0!=e){var p=this.model.getParent(f[n]),m=this.layoutManager.getLayout(p);
-null==m?null!=k&&this.isMoveCellsEvent(k,q)&&this.moveSiblings(q,p,e,g):null!=k&&mxEvent.isAltDown(k)||m.constructor!=mxStackLayout||m.resizeLast||this.resizeParentStacks(p,m,e,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
-Graph.prototype.moveSiblings=function(a,c,f,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<k.length;c++)if(k[c]!=a.cell){var n=this.view.getState(k[c]),q=this.getCellGeometry(k[c]);null!=n&&null!=q&&(q=q.clone(),q.translate(Math.round(f*Math.max(0,Math.min(1,(n.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(n.y-a.y)/a.height)))),this.model.setGeometry(k[c],q))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,c,f,d){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var k=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==k&&!c.resizeLast;){var n=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=n&&(n=n.clone(),c.horizontal?n.width+=f+Math.min(0,q.width/this.view.scale-n.width):n.height+=d+Math.min(0,q.height/this.view.scale-n.height),this.model.setGeometry(a,
-n));a=this.model.getParent(a);c=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var c=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(a){var c=this.getCurrentCellStyle(a);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.foldCells=function(a,c,f,d,k){c=null!=c?c:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<f.length;m++){var q=this.view.getState(f[m]),b=this.getCellGeometry(f[m]);if(null!=q&&null!=b){var e=Math.round(b.width-q.width/this.view.scale),g=Math.round(b.height-q.height/this.view.scale);if(0!=g||0!=e){var p=this.model.getParent(f[m]),n=this.layoutManager.getLayout(p);
+null==n?null!=k&&this.isMoveCellsEvent(k,q)&&this.moveSiblings(q,p,e,g):null!=k&&mxEvent.isAltDown(k)||n.constructor!=mxStackLayout||n.resizeLast||this.resizeParentStacks(p,n,e,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
+Graph.prototype.moveSiblings=function(a,c,f,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<k.length;c++)if(k[c]!=a.cell){var m=this.view.getState(k[c]),q=this.getCellGeometry(k[c]);null!=m&&null!=q&&(q=q.clone(),q.translate(Math.round(f*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(k[c],q))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,c,f,d){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var k=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==k&&!c.resizeLast;){var m=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=m&&(m=m.clone(),c.horizontal?m.width+=f+Math.min(0,q.width/this.view.scale-m.width):m.height+=d+Math.min(0,q.height/this.view.scale-m.height),this.model.setGeometry(a,
+m));a=this.model.getParent(a);c=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var c=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(a){var c=this.getCurrentCellStyle(a);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);return null!=c.movableLabel?"0"!=c.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,c,f){f=f||this.getDefaultParent();this.isCellLocked(f)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(a,c,f){var d=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(d)&&(d=null);return d};Graph.prototype.isCellFoldable=function(a){var c=this.getCurrentCellStyle(a);return this.foldingEnabled&&("1"==c.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=c.collapsible||!this.isContainer(a)&&"1"==c.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
Graph.prototype.zoom=function(a,c){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(a,c){c=null!=c?c:10;var f=this.container.clientWidth-c,d=this.container.clientHeight-c,k=Math.floor(20*Math.min(f/a.width,d/a.height))/20;this.zoomTo(k);if(mxUtils.hasScrollbars(this.container)){var n=this.view.translate;this.container.scrollTop=(a.y+n.y)*k-Math.max((d-a.height*k)/2+c/2,0);this.container.scrollLeft=(a.x+n.x)*k-Math.max((f-a.width*k)/2+c/2,0)}};
+Graph.prototype.fitWindow=function(a,c){c=null!=c?c:10;var f=this.container.clientWidth-c,d=this.container.clientHeight-c,k=Math.floor(20*Math.min(f/a.width,d/a.height))/20;this.zoomTo(k);if(mxUtils.hasScrollbars(this.container)){var m=this.view.translate;this.container.scrollTop=(a.y+m.y)*k-Math.max((d-a.height*k)/2+c/2,0);this.container.scrollLeft=(a.x+m.x)*k-Math.max((f-a.width*k)/2+c/2,0)}};
Graph.prototype.getTooltipForCell=function(a){var c="";if(mxUtils.isNode(a.value)){var f=a.value.getAttribute("tooltip");if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),c=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&f.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(f,a[k].nodeName)&&0<a[k].nodeValue.length&&d.push({name:a[k].nodeName,value:a[k].nodeValue});d.sort(function(a,c){return a.name<c.name?
-1:a.name>c.name?1:0});for(k=0;k<d.length;k++)"link"==d[k].name&&this.isCustomLink(d[k].value)||(c+=("link"!=d[k].name?"<b>"+d[k].name+":</b> ":"")+mxUtils.htmlEntities(d[k].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;">'+c+"</div>"))}}return c};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};
Graph.prototype.compress=function(a,c){return Graph.compress(a,c)};Graph.prototype.decompress=function(a,c){return Graph.decompress(a,c)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
@@ -2491,8 +2491,8 @@ IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUC
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=
mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);
this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,
-mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(c.getEvent())||this.graph.model.isVertex(c.getCell())||this.reset()});var c=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){c=!1;var f=d.getEvent();if(this.isResetEvent(f))this.reset();else if(!this.isActive()){var n=this.getState(d.getState());
-null==n&&mxEvent.isTouchEvent(f)||this.update(n)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var f=d.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var f=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));
+mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(c.getEvent())||this.graph.model.isVertex(c.getCell())||this.reset()});var c=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){c=!1;var f=d.getEvent();if(this.isResetEvent(f))this.reset();else if(!this.isActive()){var m=this.getState(d.getState());
+null==m&&mxEvent.isTouchEvent(f)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var f=d.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var f=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));
this.isResetEvent(f)?this.reset():this.isActive()&&!c&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(f)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||
this.reset();c=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,c){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
HoverIcons.prototype.createArrow=function(a,c){var f=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(f=document.createElement(mxClient.VML_PREFIX+":image"),f.setAttribute("src",a.src),f.style.borderStyle="none"):(f=document.createElement("div"),f.style.backgroundImage="url("+a.src+")",f.style.backgroundPosition="center",f.style.backgroundRepeat="no-repeat"),f.style.width=a.width+4+"px",f.style.height=a.height+4+"px",f.style.display=mxClient.IS_QUIRKS?"inline":
@@ -2502,84 +2502,84 @@ this.resetActiveArrow()}));return f};HoverIcons.prototype.resetActiveArrow=funct
HoverIcons.prototype.visitNodes=function(a){for(var c=0;c<this.elts.length;c++)null!=this.elts[c]&&a(this.elts[c])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(c){c.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,c,f){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,c,f),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=c&&c.setHandlesVisible(!1),c=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=c&&"orthogonalEdgeStyle"===
mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),c.cell.style=mxUtils.setStyle(c.cell.style,"sourcePortConstraint",a),c.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,c,f){return this.graph.view.getState(this.graph.getCellAt(c,f))};
-HoverIcons.prototype.click=function(a,c,f){var d=f.getEvent(),k=f.getGraphX(),n=f.getGraphY(),k=this.getStateAt(a,k,n);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,c,f):(this.graph.setSelectionCell(k.cell),this.reset());f.consume()};
+HoverIcons.prototype.click=function(a,c,f){var d=f.getEvent(),k=f.getGraphX(),m=f.getGraphY(),k=this.getStateAt(a,k,m);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,c,f):(this.graph.setSelectionCell(k.cell),this.reset());f.consume()};
HoverIcons.prototype.execute=function(a,c,f){f=f.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,c,this.graph.defaultEdgeLength,f),f,this)};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
var c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(c=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var f=null;null!=c&&(a.x-=c.horizontalOffset/2,a.y-=c.verticalOffset/2,a.width+=c.horizontalOffset,a.height+=c.verticalOffset,null!=c.rotationShape&&null!=c.rotationShape.node&&"hidden"!=c.rotationShape.node.style.visibility&&"none"!=c.rotationShape.node.style.display&&null!=c.rotationShape.boundingBox&&
(f=c.rotationShape.boundingBox));c=mxUtils.bind(this,function(a,e,c){if(null!=f){var b=new mxRectangle(e,c,a.clientWidth,a.clientHeight);mxUtils.intersects(b,f)&&(a==this.arrowUp?c-=b.y+b.height-f.y:a==this.arrowRight?e+=f.x+f.width-b.x:a==this.arrowDown?c+=f.y+f.height-b.y:a==this.arrowLeft&&(e-=b.x+b.width-f.x))}a.style.left=e+"px";a.style.top=c+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});c(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
this.triangleUp.height-this.tolerance));c(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));c(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));c(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var c=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),
-d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),k=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=c&&c==d&&d==k&&k==a&&(a=k=d=c=null);var n=this.graph.getCellGeometry(this.currentState.cell),q=mxUtils.bind(this,function(a,e){var b=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
-this.currentState.cell)||this.graph.isSwimlane(a)||!(null==b||null==n||b.height<3*n.height&&b.width<3*n.width)?e.style.visibility="visible":e.style.visibility="hidden"});q(c,this.arrowRight);q(d,this.arrowLeft);q(k,this.arrowUp);q(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),k=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=c&&c==d&&d==k&&k==a&&(a=k=d=c=null);var m=this.graph.getCellGeometry(this.currentState.cell),q=mxUtils.bind(this,function(a,e){var b=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
+this.currentState.cell)||this.graph.isSwimlane(a)||!(null==b||null==m||b.height<3*m.height&&b.width<3*m.width)?e.style.visibility="visible":e.style.visibility="hidden"});q(c,this.arrowRight);q(d,this.arrowLeft);q(k,this.arrowUp);q(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(c){null!=c.parentNode&&(c=new mxRectangle(c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight),null==a?a=c:a.add(c))});return a};
HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var c=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(c)&&this.graph.isCellConnectable(c)&&(a=c)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
HoverIcons.prototype.update=function(a,c,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,c,f))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,f)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==c||null==f||!mxUtils.contains(this.bbox,
c,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,c,f,d,k){a=this.cloneCell(a);for(var n=0;n<f;n++){var q=this.cloneCell(c),b=this.getCellGeometry(q);null!=b&&(b.x+=n*d,b.y+=n*k);a.insert(q)}return a};
-Graph.prototype.createTable=function(a,c,f,d,k,n,q,b,e){f=null!=f?f:60;d=null!=d?d:40;n=null!=n?n:30;b=null!=b?b:"shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";e=null!=e?e:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;";return this.createParent(this.createVertex(null,null,null!=k?k:"",
-0,0,c*f,a*d+(null!=k?n:0),null!=q?q:"shape=table;html=1;whiteSpace=wrap;startSize="+(null!=k?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*f,d,b),this.createVertex(null,null,"",0,0,f,d,e),c,f,0),a,0,d)};
-Graph.prototype.setTableValues=function(a,c,f){for(var d=this.model.getChildCells(a,!0),k=0;k<d.length;k++)if(null!=f&&(d[k].value=f[k]),null!=c)for(var n=this.model.getChildCells(d[k],!0),q=0;q<n.length;q++)null!=c[k][q]&&(n[q].value=c[k][q]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,c,f,d,k,n,q,b,e){f=null!=f?f:120;d=null!=d?d:120;k=null!=k?k:40;q=null!=q?q:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";b=null!=b?b:"swimlane;connectable=0;startSize=40;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";e=null!=e?e:"swimlane;connectable=0;startSize=0;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-k=this.createVertex(null,null,"",0,0,c*f,a*d,null!=n?n:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");n=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=n;k.geometry.height+=n;q=this.createVertex(null,null,"",0,n,c*f+n,d,q);k.insert(this.createParent(q,this.createVertex(null,null,"",n,0,f,d,b),c,f,0));return 1<a?(q.geometry.y=
-d+n,this.createParent(k,this.createParent(q,this.createVertex(null,null,"",n,0,f,d,e),c,f,0),a-1,0,d)):k};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
-Graph.prototype.setTableRowHeight=function(a,c,f){f=null!=f?f:!0;var d=this.getModel();d.beginUpdate();try{var k=this.getCellGeometry(a);if(null!=k){k=k.clone();k.height+=c;d.setGeometry(a,k);var n=d.getParent(a),q=d.getChildCells(n,!0);if(!f){var b=mxUtils.indexOf(q,a);if(b<q.length-1){var e=q[b+1],g=this.getCellGeometry(e);null!=g&&(g=g.clone(),g.y+=c,g.height-=c,d.setGeometry(e,g))}}var p=this.getCellGeometry(n);null!=p&&(f||(f=a==q[q.length-1]),f&&(p=p.clone(),p.height+=c,d.setGeometry(n,p)));
-null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}}finally{d.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,c,f){f=null!=f?f:!1;var d=this.getModel(),k=d.getParent(a),n=d.getParent(k),q=d.getChildCells(k,!0);a=mxUtils.indexOf(q,a);var b=a==q.length-1;d.beginUpdate();try{for(var e=d.getChildCells(n,!0),g=0;g<e.length;g++){var k=e[g],q=d.getChildCells(k,!0),p=q[a],m=this.getCellGeometry(p);null!=m&&(m=m.clone(),m.width+=c,d.setGeometry(p,m));a<q.length-1&&(p=q[a+1],m=this.getCellGeometry(p),null!=m&&(m=m.clone(),m.x+=c,f||(m.width-=c),d.setGeometry(p,m)))}if(b||
-f){var l=this.getCellGeometry(n);null!=l&&(l=l.clone(),l.width+=c,d.setGeometry(n,l))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
-TableLayout.prototype.getSize=function(a,c){for(var f=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var k=this.graph.getCellGeometry(a[d]);null!=k&&(f+=c?k.width:k.height)}return f};TableLayout.prototype.getRowLayout=function(a,c){for(var f=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0),k=this.getSize(f,!0),n=c-d.x-d.width,q=[],d=d.x,b=0;b<f.length;b++){var e=this.graph.getCellGeometry(f[b]);null!=e&&(d+=e.width*n/k,q.push(Math.round(d)))}return q};
-TableLayout.prototype.layoutRow=function(a,c,f,d){var k=this.graph.getModel(),n=k.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var q=a.x,b=0;null!=c&&(c=c.slice(),c.splice(0,0,a.x));for(var e=0;e<n.length;e++){var g=this.graph.getCellGeometry(n[e]);null!=g&&(g=g.clone(),g.y=a.y,g.height=f-a.y-a.height,null!=c?(g.x=c[e],g.width=c[e+1]-g.x,e==n.length-1&&e<c.length-2&&(g.width=d-g.x-a.x-a.width)):(g.x=q,q+=g.width,e==n.length-1?g.width=d-a.x-a.width-b:b+=g.width),k.setGeometry(n[e],g))}return b};
-TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),k="1"==mxUtils.getValue(d,"resizeLastRow","0"),n="1"==mxUtils.getValue(d,"resizeLast","0"),d="1"==mxUtils.getValue(d,"fixedRows","0"),q=this.graph.getModel(),b=0;q.beginUpdate();try{var e=f.height-c.y-c.height,g=f.width-c.x-c.width,p=q.getChildCells(a,!0),m=this.getSize(p,!1);if(0<e&&0<g&&0<p.length&&0<m){if(k){var l=this.graph.getCellGeometry(p[p.length-
-1]);null!=l&&(l=l.clone(),l.height=e-m+l.height,q.setGeometry(p[p.length-1],l))}for(var v=n?null:this.getRowLayout(p[0],g),t=c.y,y=0;y<p.length;y++)l=this.graph.getCellGeometry(p[y]),null!=l&&(l=l.clone(),l.x=c.x,l.width=g,l.y=Math.round(t),t=k||d?t+l.height:t+l.height/m*e,l.height=Math.round(t)-l.y,q.setGeometry(p[y],l)),b=Math.max(b,this.layoutRow(p[y],v,l.height,g));d&&e<m&&(f=f.clone(),f.height=t+c.height,q.setGeometry(a,f));n&&g<b+Graph.minTableColumnWidth&&(f=f.clone(),f.width=b+c.width+c.x+
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,c,f,d,k){a=this.cloneCell(a);for(var m=0;m<f;m++){var q=this.cloneCell(c),b=this.getCellGeometry(q);null!=b&&(b.x+=m*d,b.y+=m*k);a.insert(q)}return a};
+Graph.prototype.createTable=function(a,c,f,d,k,m,q,b,e){f=null!=f?f:60;d=null!=d?d:40;m=null!=m?m:30;b=null!=b?b:"shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";e=null!=e?e:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;";return this.createParent(this.createVertex(null,null,null!=k?k:"",
+0,0,c*f,a*d+(null!=k?m:0),null!=q?q:"shape=table;html=1;whiteSpace=wrap;startSize="+(null!=k?m:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*f,d,b),this.createVertex(null,null,"",0,0,f,d,e),c,f,0),a,0,d)};
+Graph.prototype.setTableValues=function(a,c,f){for(var d=this.model.getChildCells(a,!0),k=0;k<d.length;k++)if(null!=f&&(d[k].value=f[k]),null!=c)for(var m=this.model.getChildCells(d[k],!0),q=0;q<m.length;q++)null!=c[k][q]&&(m[q].value=c[k][q]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,c,f,d,k,m,q,b,e){f=null!=f?f:120;d=null!=d?d:120;k=null!=k?k:40;q=null!=q?q:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";b=null!=b?b:"swimlane;connectable=0;startSize=40;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";e=null!=e?e:"swimlane;connectable=0;startSize=0;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+k=this.createVertex(null,null,"",0,0,c*f,a*d,null!=m?m:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");m=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=m;k.geometry.height+=m;q=this.createVertex(null,null,"",0,m,c*f+m,d,q);k.insert(this.createParent(q,this.createVertex(null,null,"",m,0,f,d,b),c,f,0));return 1<a?(q.geometry.y=
+d+m,this.createParent(k,this.createParent(q,this.createVertex(null,null,"",m,0,f,d,e),c,f,0),a-1,0,d)):k};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
+Graph.prototype.setTableRowHeight=function(a,c,f){f=null!=f?f:!0;var d=this.getModel();d.beginUpdate();try{var k=this.getCellGeometry(a);if(null!=k){k=k.clone();k.height+=c;d.setGeometry(a,k);var m=d.getParent(a),q=d.getChildCells(m,!0);if(!f){var b=mxUtils.indexOf(q,a);if(b<q.length-1){var e=q[b+1],g=this.getCellGeometry(e);null!=g&&(g=g.clone(),g.y+=c,g.height-=c,d.setGeometry(e,g))}}var p=this.getCellGeometry(m);null!=p&&(f||(f=a==q[q.length-1]),f&&(p=p.clone(),p.height+=c,d.setGeometry(m,p)));
+null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}}finally{d.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,c,f){f=null!=f?f:!1;var d=this.getModel(),k=d.getParent(a),m=d.getParent(k),q=d.getChildCells(k,!0);a=mxUtils.indexOf(q,a);var b=a==q.length-1;d.beginUpdate();try{for(var e=d.getChildCells(m,!0),g=0;g<e.length;g++){var k=e[g],q=d.getChildCells(k,!0),p=q[a],n=this.getCellGeometry(p);null!=n&&(n=n.clone(),n.width+=c,d.setGeometry(p,n));a<q.length-1&&(p=q[a+1],n=this.getCellGeometry(p),null!=n&&(n=n.clone(),n.x+=c,f||(n.width-=c),d.setGeometry(p,n)))}if(b||
+f){var l=this.getCellGeometry(m);null!=l&&(l=l.clone(),l.width+=c,d.setGeometry(m,l))}null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+TableLayout.prototype.getSize=function(a,c){for(var f=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var k=this.graph.getCellGeometry(a[d]);null!=k&&(f+=c?k.width:k.height)}return f};TableLayout.prototype.getRowLayout=function(a,c){for(var f=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0),k=this.getSize(f,!0),m=c-d.x-d.width,q=[],d=d.x,b=0;b<f.length;b++){var e=this.graph.getCellGeometry(f[b]);null!=e&&(d+=e.width*m/k,q.push(Math.round(d)))}return q};
+TableLayout.prototype.layoutRow=function(a,c,f,d){var k=this.graph.getModel(),m=k.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var q=a.x,b=0;null!=c&&(c=c.slice(),c.splice(0,0,a.x));for(var e=0;e<m.length;e++){var g=this.graph.getCellGeometry(m[e]);null!=g&&(g=g.clone(),g.y=a.y,g.height=f-a.y-a.height,null!=c?(g.x=c[e],g.width=c[e+1]-g.x,e==m.length-1&&e<c.length-2&&(g.width=d-g.x-a.x-a.width)):(g.x=q,q+=g.width,e==m.length-1?g.width=d-a.x-a.width-b:b+=g.width),k.setGeometry(m[e],g))}return b};
+TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),k="1"==mxUtils.getValue(d,"resizeLastRow","0"),m="1"==mxUtils.getValue(d,"resizeLast","0"),d="1"==mxUtils.getValue(d,"fixedRows","0"),q=this.graph.getModel(),b=0;q.beginUpdate();try{var e=f.height-c.y-c.height,g=f.width-c.x-c.width,p=q.getChildCells(a,!0),n=this.getSize(p,!1);if(0<e&&0<g&&0<p.length&&0<n){if(k){var l=this.graph.getCellGeometry(p[p.length-
+1]);null!=l&&(l=l.clone(),l.height=e-n+l.height,q.setGeometry(p[p.length-1],l))}for(var x=m?null:this.getRowLayout(p[0],g),t=c.y,y=0;y<p.length;y++)l=this.graph.getCellGeometry(p[y]),null!=l&&(l=l.clone(),l.x=c.x,l.width=g,l.y=Math.round(t),t=k||d?t+l.height:t+l.height/n*e,l.height=Math.round(t)-l.y,q.setGeometry(p[y],l)),b=Math.max(b,this.layoutRow(p[y],x,l.height,g));d&&e<n&&(f=f.clone(),f.height=t+c.height,q.setGeometry(a,f));m&&g<b+Graph.minTableColumnWidth&&(f=f.clone(),f.width=b+c.width+c.x+
Graph.minTableColumnWidth,q.setGeometry(a,f))}}finally{q.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var e=this.getState(a);null!=e&&b&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&!e.invalid&&this.updateLineJumps(e)&&this.graph.cellRenderer.redraw(e,!1,this.isRendering());e=c.apply(this,
arguments);null!=e&&b&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var f=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return f.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=a.routedPoints,c=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(b,e,d){var f=new mxPoint(e,d);f.type=b;c.push(f);f=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==f||f.type!=b||f.x!=e||f.y!=d},f=.5*this.scale,e=!1,c=[],t=0;t<b.length-1;t++){for(var k=
-b[t+1],n=b[t],q=[],A=b[t+2];t<b.length-2&&mxUtils.ptSegDistSq(n.x,n.y,A.x,A.y,k.x,k.y)<1*this.scale*this.scale;)k=A,t++,A=b[t+2];for(var e=d(0,n.x,n.y)||e,C=0;C<this.validEdges.length;C++){var z=this.validEdges[C],E=z.absolutePoints;if(null!=E&&mxUtils.intersects(a,z)&&"1"!=z.style.noJump)for(z=0;z<E.length-1;z++){for(var G=E[z+1],F=E[z],A=E[z+2];z<E.length-2&&mxUtils.ptSegDistSq(F.x,F.y,A.x,A.y,G.x,G.y)<1*this.scale*this.scale;)G=A,z++,A=E[z+2];A=mxUtils.intersection(n.x,n.y,k.x,k.y,F.x,F.y,G.x,
-G.y);if(null!=A&&(Math.abs(A.x-n.x)>f||Math.abs(A.y-n.y)>f)&&(Math.abs(A.x-k.x)>f||Math.abs(A.y-k.y)>f)&&(Math.abs(A.x-F.x)>f||Math.abs(A.y-F.y)>f)&&(Math.abs(A.x-G.x)>f||Math.abs(A.y-G.y)>f)){G=A.x-n.x;F=A.y-n.y;A={distSq:G*G+F*F,x:A.x,y:A.y};for(G=0;G<q.length;G++)if(q[G].distSq>A.distSq){q.splice(G,0,A);A=null;break}null==A||0!=q.length&&q[q.length-1].x===A.x&&q[q.length-1].y===A.y||q.push(A)}}}for(z=0;z<q.length;z++)e=d(1,q[z].x,q[z].y)||e}A=b[b.length-1];e=d(0,A.x,A.y)||e}a.routedPoints=c;return e}return!1};
+b[t+1],m=b[t],q=[],z=b[t+2];t<b.length-2&&mxUtils.ptSegDistSq(m.x,m.y,z.x,z.y,k.x,k.y)<1*this.scale*this.scale;)k=z,t++,z=b[t+2];for(var e=d(0,m.x,m.y)||e,C=0;C<this.validEdges.length;C++){var A=this.validEdges[C],E=A.absolutePoints;if(null!=E&&mxUtils.intersects(a,A)&&"1"!=A.style.noJump)for(A=0;A<E.length-1;A++){for(var G=E[A+1],F=E[A],z=E[A+2];A<E.length-2&&mxUtils.ptSegDistSq(F.x,F.y,z.x,z.y,G.x,G.y)<1*this.scale*this.scale;)G=z,A++,z=E[A+2];z=mxUtils.intersection(m.x,m.y,k.x,k.y,F.x,F.y,G.x,
+G.y);if(null!=z&&(Math.abs(z.x-m.x)>f||Math.abs(z.y-m.y)>f)&&(Math.abs(z.x-k.x)>f||Math.abs(z.y-k.y)>f)&&(Math.abs(z.x-F.x)>f||Math.abs(z.y-F.y)>f)&&(Math.abs(z.x-G.x)>f||Math.abs(z.y-G.y)>f)){G=z.x-m.x;F=z.y-m.y;z={distSq:G*G+F*F,x:z.x,y:z.y};for(G=0;G<q.length;G++)if(q[G].distSq>z.distSq){q.splice(G,0,z);z=null;break}null==z||0!=q.length&&q[q.length-1].x===z.x&&q[q.length-1].y===z.y||q.push(z)}}}for(A=0;A<q.length;A++)e=d(1,q[A].x,q[A].y)||e}z=b[b.length-1];e=d(0,z.x,z.y)||e}a.routedPoints=c;return e}return!1};
var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,
-"jumpStyle","none"),g=!0,p=null,n=null,q=[],A=null;a.begin();for(var C=0;C<this.state.routedPoints.length;C++){var z=this.state.routedPoints[C],E=new mxPoint(z.x/this.scale,z.y/this.scale);0==C?E=b[0]:C==this.state.routedPoints.length-1&&(E=b[b.length-1]);var G=!1;if(null!=p&&1==z.type){var F=this.state.routedPoints[C+1],z=F.x/this.scale-E.x,F=F.y/this.scale-E.y,z=z*z+F*F;null==A&&(A=new mxPoint(E.x-p.x,E.y-p.y),n=Math.sqrt(A.x*A.x+A.y*A.y),0<n?(A.x=A.x*d/n,A.y=A.y*d/n):A=null);z>d*d&&0<n&&(z=p.x-
-E.x,F=p.y-E.y,z=z*z+F*F,z>d*d&&(G=new mxPoint(E.x-A.x,E.y-A.y),z=new mxPoint(E.x+A.x,E.y+A.y),q.push(G),this.addPoints(a,q,c,e,!1,null,g),q=0>Math.round(A.x)||0==Math.round(A.x)&&0>=Math.round(A.y)?1:-1,g=!1,"sharp"==f?(a.lineTo(G.x-A.y*q,G.y+A.x*q),a.lineTo(z.x-A.y*q,z.y+A.x*q),a.lineTo(z.x,z.y)):"arc"==f?(q*=1.3,a.curveTo(G.x-A.y*q,G.y+A.x*q,z.x-A.y*q,z.y+A.x*q,z.x,z.y)):(a.moveTo(z.x,z.y),g=!0),q=[z],G=!0))}else A=null;G||(q.push(E),p=E)}this.addPoints(a,q,c,e,!1,null,g);a.stroke()}};var n=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)n.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var p=Math.cos(-g),k=Math.sin(-g),e=mxUtils.getRotatedPoint(e,p,k,m);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);p+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);e=this.getPerimeterPoint(b,e,0==g&&f,p);0!=g&&(p=Math.cos(g),k=Math.sin(g),e=mxUtils.getRotatedPoint(e,p,k,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,f){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var e=0;e<a.length;e++){var g=this.graph.getConnectionPoint(b,
-a[e]);if(null!=g){var m=(g.x-f.x)*(g.x-f.x)+(g.y-f.y)*(g.y-f.y);if(null==d||m<d)c=g,d=m}}null!=c&&(f=c)}return f};var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var e=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var b=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var e=
+"jumpStyle","none"),g=!0,p=null,m=null,q=[],z=null;a.begin();for(var C=0;C<this.state.routedPoints.length;C++){var A=this.state.routedPoints[C],E=new mxPoint(A.x/this.scale,A.y/this.scale);0==C?E=b[0]:C==this.state.routedPoints.length-1&&(E=b[b.length-1]);var G=!1;if(null!=p&&1==A.type){var F=this.state.routedPoints[C+1],A=F.x/this.scale-E.x,F=F.y/this.scale-E.y,A=A*A+F*F;null==z&&(z=new mxPoint(E.x-p.x,E.y-p.y),m=Math.sqrt(z.x*z.x+z.y*z.y),0<m?(z.x=z.x*d/m,z.y=z.y*d/m):z=null);A>d*d&&0<m&&(A=p.x-
+E.x,F=p.y-E.y,A=A*A+F*F,A>d*d&&(G=new mxPoint(E.x-z.x,E.y-z.y),A=new mxPoint(E.x+z.x,E.y+z.y),q.push(G),this.addPoints(a,q,c,e,!1,null,g),q=0>Math.round(z.x)||0==Math.round(z.x)&&0>=Math.round(z.y)?1:-1,g=!1,"sharp"==f?(a.lineTo(G.x-z.y*q,G.y+z.x*q),a.lineTo(A.x-z.y*q,A.y+z.x*q),a.lineTo(A.x,A.y)):"arc"==f?(q*=1.3,a.curveTo(G.x-z.y*q,G.y+z.x*q,A.x-z.y*q,A.y+z.x*q,A.x,A.y)):(a.moveTo(A.x,A.y),g=!0),q=[A],G=!0))}else z=null;G||(q.push(E),p=E)}this.addPoints(a,q,c,e,!1,null,g);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var p=Math.cos(-g),k=Math.sin(-g),e=mxUtils.getRotatedPoint(e,p,k,n);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);p+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);e=this.getPerimeterPoint(b,e,0==g&&f,p);0!=g&&(p=Math.cos(g),k=Math.sin(g),e=mxUtils.getRotatedPoint(e,p,k,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,f){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var e=0;e<a.length;e++){var g=this.graph.getConnectionPoint(b,
+a[e]);if(null!=g){var n=(g.x-f.x)*(g.x-f.x)+(g.y-f.y)*(g.y-f.y);if(null==d||n<d)c=g,d=n}}null!=c&&(f=c)}return f};var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var e=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var b=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var e=
mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=e&&"string"===typeof e&&"stencil("==e.substring(0,8))try{var c=e.substring(8,e.length-1),d=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(d.documentElement))}catch(l){null!=window.console&&console.log("Error in shape: "+l)}}return b.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){c=mxStencilRegistry.libraries[f];if(null!=c){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<c.length;d++){var k=c[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var n=
-mxUtils.load(k);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",k,q)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
+mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){c=mxStencilRegistry.libraries[f];if(null!=c){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<c.length;d++){var k=c[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var m=
+mxUtils.load(k);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",k,q)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
mxStencilRegistry.getBasenameForStencil=function(a){var c=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var c=a[1],f=2;f<a.length-1;f++)c+="/"+a[f];return c};
-mxStencilRegistry.loadStencilSet=function(a,c,f,d){var k=mxStencilRegistry.packages[a];if(null!=f&&f||null==k){var n=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,n=!0,mxStencilRegistry.parseStencilSet(d.documentElement,c,n))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;n=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!=
-k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,c,n)}};mxStencilRegistry.loadStencil=function(a,c){if(null!=c)mxUtils.get(a,mxUtils.bind(this,function(a){c(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var c=0;c<a.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[c]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,c,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,c,f),d=d.nextSibling;else{f=null!=f?f:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),n=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(k+n.toLowerCase(),new mxStencil(d));if(null!=c){var q=d.getAttribute("w"),
-b=d.getAttribute("h"),q=null==q?80:parseInt(q,10),b=null==b?80:parseInt(b,10);c(k,n,a,q,b)}}d=d.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,c,f,d){var k=mxStencilRegistry.packages[a];if(null!=f&&f||null==k){var m=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,c,m))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;m=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!=
+k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,c,m)}};mxStencilRegistry.loadStencil=function(a,c){if(null!=c)mxUtils.get(a,mxUtils.bind(this,function(a){c(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var c=0;c<a.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[c]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,c,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,c,f),d=d.nextSibling;else{f=null!=f?f:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),m=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(k+m.toLowerCase(),new mxStencil(d));if(null!=c){var q=d.getAttribute("w"),
+b=d.getAttribute("h"),q=null==q?80:parseInt(q,10),b=null==b?80:parseInt(b,10);c(k,m,a,q,b)}}d=d.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function c(a,b){switch(b){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
"#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=
!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var f=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(a){return f.apply(this,arguments)||this.graph.isTableRow(a)||this.graph.isTableCell(a)};var d=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||d.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=
function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var b in this.graph.currentEdgeStyle)a.style[b]=this.graph.currentEdgeStyle[b];
-return a};var k=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=k.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var n=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=n.apply(this,arguments),b=a.getCell;a.getCell=mxUtils.bind(this,function(a){var e=b.apply(this,arguments);this.error=
+return a};var k=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=k.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var m=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=m.apply(this,arguments),b=a.getCell;a.getCell=mxUtils.bind(this,function(a){var e=b.apply(this,arguments);this.error=
null;return e});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.sketch&&(a+="sketch="+this.currentEdgeStyle.sketch+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};
Graph.prototype.updateCellStyles=function(a,b,e){this.model.beginUpdate();try{for(var c=0;c<e.length;c++)if(this.model.isVertex(e[c])||this.model.isEdge(e[c])){this.setCellStyles(a,null,[e[c]]);var d=this.getCellStyle(e[c])[a];b!=(null==d?mxConstants.NONE:d)&&this.setCellStyles(a,b,[e[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?
mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,b){b=null!=b?b:{};for(var e=0;e<a.length;e++){var c=a[e];b[mxObjectIdentity.get(c)]=c.getId();for(var d=this.model.getChildCount(c),f=0;f<d;f++)this.createCellLookup([this.model.getChildAt(c,f)],b)}return b};Graph.prototype.createCellMapping=function(a,b,e){e=null!=e?e:{};for(var c in a){var d=b[c];null==e[d]&&(e[d]=a[c].getId()||
-"")}return e};Graph.prototype.importGraphModel=function(a,b,e,c){b=null!=b?b:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),f=new mxGraphModel;d.decode(a,f);a=[];var d={},g={},m=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),d));if(null!=m){var p=this.createCellLookup([f.root]),m=m.slice();this.model.beginUpdate();try{if(1!=m.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<m.length;f++){var l=this.model.getChildren(this.moveCells([m[f]],b,e,!1,this.model.getRoot())[0]);
-null!=l&&(a=a.concat(l))}else a=this.moveCells(f.getChildren(m[0]),b,e,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,p,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(b=this.snap(b),e=this.snap(e));var u=this.getBoundingBoxFromGeometry(a,!0);null!=u&&this.moveCells(a,b-u.x,e-u.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},e=this.cloneCells(a,null,b),
-c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(var f=new mxCodec,g=new mxGraphModel,m=g.getChildAt(g.getRoot(),0),d=0;d<e.length;d++){g.add(m,e[d]);var p=this.view.getState(a[d]);if(null!=p){var l=this.getCellGeometry(e[d]);null!=l&&l.relative&&!this.model.isEdge(a[d])&&null==c.get(this.model.getParent(a[d]))&&(l.offset=null,l.relative=!1,l.x=p.x/p.view.scale-p.view.translate.x,l.y=p.y/p.view.scale-p.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(b,this.createCellLookup(a)),
+"")}return e};Graph.prototype.importGraphModel=function(a,b,e,c){b=null!=b?b:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),f=new mxGraphModel;d.decode(a,f);a=[];var d={},g={},n=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),d));if(null!=n){var l=this.createCellLookup([f.root]),n=n.slice();this.model.beginUpdate();try{if(1!=n.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<n.length;f++){var u=this.model.getChildren(this.moveCells([n[f]],b,e,!1,this.model.getRoot())[0]);
+null!=u&&(a=a.concat(u))}else a=this.moveCells(f.getChildren(n[0]),b,e,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,l,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(b=this.snap(b),e=this.snap(e));var p=this.getBoundingBoxFromGeometry(a,!0);null!=p&&this.moveCells(a,b-p.x,e-p.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},e=this.cloneCells(a,null,b),
+c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(var f=new mxCodec,g=new mxGraphModel,n=g.getChildAt(g.getRoot(),0),d=0;d<e.length;d++){g.add(n,e[d]);var l=this.view.getState(a[d]);if(null!=l){var u=this.getCellGeometry(e[d]);null!=u&&u.relative&&!this.model.isEdge(a[d])&&null==c.get(this.model.getParent(a[d]))&&(u.offset=null,u.relative=!1,u.x=l.x/l.view.scale-l.view.translate.x,u.y=l.y/l.view.scale-l.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(b,this.createCellLookup(a)),
e);return f.encode(g)};Graph.prototype.isSwimlane=function(a,b){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var e=this.getCurrentCellStyle(a,b)[mxConstants.STYLE_SHAPE];return e==mxConstants.SHAPE_SWIMLANE||"table"==e}return!1};var q=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);if(null!=b){var e=this.getCurrentCellStyle(b);if(null!=e.expand)return"0"!=e.expand}return q.apply(this,arguments)&&(null==b||
-!this.isTable(b))};var b=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,e,c,d,f,g,m,p){null==p&&(p=this.model.getParent(a),this.isTable(p)||this.isTableRow(p))&&(p=this.getCellAt(g,m,null,!0,!1));b.apply(this,[a,e,c,d,f,g,m,p])};var e=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)e.apply(this,arguments);else{var d=this.getSelectionCell(),f=null,g=[],m=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(g.push(b),
-b==d)f=g.length-1;else if(a&&null==d&&0<g.length||null!=f&&a&&g.length>f||!a&&0<f)return;for(var e=0;e<this.model.getChildCount(b);e++)m(this.model.getChildAt(b,e))});m(this.model.root);0<g.length&&(f=null!=f?mxUtils.mod(f+(a?1:-1),g.length):0,this.setSelectionCell(g[f]))}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,e,c,d,f,m){m=null!=m?m:{};if(this.isTable(d)){for(var p=[],l=0;l<a.length;l++)this.isTable(a[l])?p=p.concat(this.model.getChildCells(a[l],!0).reverse()):p.push(a[l]);
-a=p}this.model.beginUpdate();try{p=[];for(l=0;l<a.length;l++)if(null!=d&&this.isTableRow(a[l])){var u=this.model.getParent(a[l]),t=this.getCellGeometry(a[l]);this.isTable(u)&&p.push(u);if(null!=u&&null!=t&&this.isTable(u)&&this.isTable(d)&&(c||u!=d)){if(!c){var R=this.getCellGeometry(u);null!=R&&(R=R.clone(),R.height-=t.height,this.model.setGeometry(u,R))}R=this.getCellGeometry(d);null!=R&&(R=R.clone(),R.height+=t.height,this.model.setGeometry(d,R));var B=this.model.getChildCells(d,!0);if(0<B.length){var k=
-c?this.cloneCell(a[l]):a[l],n=this.model.getChildCells(k,!0),v=this.model.getChildCells(B[0],!0),y=v.length-n.length;if(0<y)for(var K=0;K<y;K++){var x=this.cloneCell(n[n.length-1]);null!=x&&(x.value="",this.model.add(k,x))}else if(0>y)for(K=0;K>y;K--)this.model.remove(n[n.length+K-1]);n=this.model.getChildCells(k,!0);for(K=0;K<v.length;K++){var L=this.getCellGeometry(v[K]),ia=this.getCellGeometry(n[K]);null!=L&&null!=ia&&(ia=ia.clone(),ia.width=L.width,this.model.setGeometry(n[K],ia))}}}}for(var H=
-g.apply(this,arguments),l=0;l<p.length;l++)!c&&this.model.contains(p[l])&&0==this.model.getChildCount(p[l])&&this.model.remove(p[l]);c&&this.updateCustomLinks(this.createCellMapping(m,this.createCellLookup(a)),H)}finally{this.model.endUpdate()}return H};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,b){var e=[];this.model.beginUpdate();try{for(var c=0;c<a.length;c++)if(this.isTableCell(a[c])){var d=this.model.getParent(a[c]),f=this.model.getParent(d);1==this.model.getChildCount(d)&&
-1==this.model.getChildCount(f)?0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f)&&e.push(f):this.labelChanged(a[c],"")}else{if(this.isTableRow(a[c])&&(f=this.model.getParent(a[c]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f))){for(var g=this.model.getChildCells(f,!0),m=0,l=0;l<g.length;l++)0<=mxUtils.indexOf(a,g[l])&&m++;m==g.length&&e.push(f)}e.push(a[c])}e=p.apply(this,[e,b])}finally{this.model.endUpdate()}return e};Graph.prototype.updateCustomLinks=function(a,b){for(var e=0;e<b.length;e++)null!=
+!this.isTable(b))};var b=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,e,c,d,f,g,n,l){null==l&&(l=this.model.getParent(a),this.isTable(l)||this.isTableRow(l))&&(l=this.getCellAt(g,n,null,!0,!1));b.apply(this,[a,e,c,d,f,g,n,l])};var e=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)e.apply(this,arguments);else{var d=this.getSelectionCell(),f=null,g=[],n=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(g.push(b),
+b==d)f=g.length-1;else if(a&&null==d&&0<g.length||null!=f&&a&&g.length>f||!a&&0<f)return;for(var e=0;e<this.model.getChildCount(b);e++)n(this.model.getChildAt(b,e))});n(this.model.root);0<g.length&&(f=null!=f?mxUtils.mod(f+(a?1:-1),g.length):0,this.setSelectionCell(g[f]))}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,e,c,d,f,n){n=null!=n?n:{};if(this.isTable(d)){for(var l=[],u=0;u<a.length;u++)this.isTable(a[u])?l=l.concat(this.model.getChildCells(a[u],!0).reverse()):l.push(a[u]);
+a=l}this.model.beginUpdate();try{l=[];for(u=0;u<a.length;u++)if(null!=d&&this.isTableRow(a[u])){var p=this.model.getParent(a[u]),t=this.getCellGeometry(a[u]);this.isTable(p)&&l.push(p);if(null!=p&&null!=t&&this.isTable(p)&&this.isTable(d)&&(c||p!=d)){if(!c){var R=this.getCellGeometry(p);null!=R&&(R=R.clone(),R.height-=t.height,this.model.setGeometry(p,R))}R=this.getCellGeometry(d);null!=R&&(R=R.clone(),R.height+=t.height,this.model.setGeometry(d,R));var B=this.model.getChildCells(d,!0);if(0<B.length){var k=
+c?this.cloneCell(a[u]):a[u],m=this.model.getChildCells(k,!0),x=this.model.getChildCells(B[0],!0),y=x.length-m.length;if(0<y)for(var K=0;K<y;K++){var v=this.cloneCell(m[m.length-1]);null!=v&&(v.value="",this.model.add(k,v))}else if(0>y)for(K=0;K>y;K--)this.model.remove(m[m.length+K-1]);m=this.model.getChildCells(k,!0);for(K=0;K<x.length;K++){var L=this.getCellGeometry(x[K]),ia=this.getCellGeometry(m[K]);null!=L&&null!=ia&&(ia=ia.clone(),ia.width=L.width,this.model.setGeometry(m[K],ia))}}}}for(var H=
+g.apply(this,arguments),u=0;u<l.length;u++)!c&&this.model.contains(l[u])&&0==this.model.getChildCount(l[u])&&this.model.remove(l[u]);c&&this.updateCustomLinks(this.createCellMapping(n,this.createCellLookup(a)),H)}finally{this.model.endUpdate()}return H};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,b){var e=[];this.model.beginUpdate();try{for(var c=0;c<a.length;c++)if(this.isTableCell(a[c])){var d=this.model.getParent(a[c]),f=this.model.getParent(d);1==this.model.getChildCount(d)&&
+1==this.model.getChildCount(f)?0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f)&&e.push(f):this.labelChanged(a[c],"")}else{if(this.isTableRow(a[c])&&(f=this.model.getParent(a[c]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f))){for(var g=this.model.getChildCells(f,!0),n=0,l=0;l<g.length;l++)0<=mxUtils.indexOf(a,g[l])&&n++;n==g.length&&e.push(f)}e.push(a[c])}e=p.apply(this,[e,b])}finally{this.model.endUpdate()}return e};Graph.prototype.updateCustomLinks=function(a,b){for(var e=0;e<b.length;e++)null!=
b[e]&&this.updateCustomLinksForCell(a,b[e])};Graph.prototype.updateCustomLinksForCell=function(a,b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var e=mxUtils.getValue(a.style,"points",null);if(null!=e){var c=[];try{for(var d=JSON.parse(e),e=0;e<d.length;e++){var f=d[e];c.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(wa){}return c}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;
d=a.shape.bounds;e=a.shape.scale;c=d.width/e;d=d.height/e;if(f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)f=c,c=d,d=f;e=a.shape.getConstraints(a.style,c,d);if(null!=e)return e;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.getCurrentCellStyle(a),b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a])}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),e=0,c=0;c<b;c++){var d=this.model.getChildAt(a,c);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||e++)}return 0<e||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,b,e){for(var c=this.getCurrentCellStyle(a),d=!0,f=!0,g=0;g<b.length&&f;g++)d=d&&this.isTable(b[g]),
f=f&&this.isTableRow(b[g]);return("1"!=mxUtils.getValue(c,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||f||d)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
arguments);if(b&&null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);null!=e&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var e=this.getModel(),c=[];e.beginUpdate();
-try{for(var d=0;d<a.length;d++){var f=a[d];if(e.isEdge(f)){var g=e.getTerminal(f,!0),m=e.getTerminal(f,!1);e.setTerminal(f,m,!0);e.setTerminal(f,g,!1);var l=e.getGeometry(f);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var p=l.getTerminalPoint(!0),u=l.getTerminalPoint(!1);l.setTerminalPoint(p,!1);l.setTerminalPoint(u,!0);e.setGeometry(f,l);var t=this.view.getState(f),B=this.view.getState(g),k=this.view.getState(m);if(null!=t){var R=null!=B?this.getConnectionConstraint(t,B,!0):null,n=
-null!=k?this.getConnectionConstraint(t,k,!1):null;this.setConnectionConstraint(f,g,!0,n);this.setConnectionConstraint(f,m,!1,R)}c.push(f)}}else if(e.isVertex(f)&&(l=this.getCellGeometry(f),null!=l)){if(!this.isTable(f)&&!this.isTableRow(f)&&!this.isTableCell(f)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var v=l.width;l.width=l.height;l.height=v;e.setGeometry(f,l)}var y=this.view.getState(f);if(null!=y){var K=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
-mxConstants.DIRECTION_NORTH],x=mxUtils.getValue(y.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,K[mxUtils.mod(mxUtils.indexOf(K,x)+(b?-1:1),K.length)],[f])}c.push(f)}}}finally{e.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var m=Graph.prototype.processChange;
-Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var b=a.cell;this.isTableCell(b)&&(b=this.model.getParent(b));this.isTableRow(b)&&(b=this.model.getParent(b));var e=this.view.getState(b);null!=e&&null!=e.shape&&(this.view.invalidate(b),e.shape.bounds=null)}m.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&
+try{for(var d=0;d<a.length;d++){var f=a[d];if(e.isEdge(f)){var g=e.getTerminal(f,!0),n=e.getTerminal(f,!1);e.setTerminal(f,n,!0);e.setTerminal(f,g,!1);var l=e.getGeometry(f);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var u=l.getTerminalPoint(!0),p=l.getTerminalPoint(!1);l.setTerminalPoint(u,!1);l.setTerminalPoint(p,!0);e.setGeometry(f,l);var t=this.view.getState(f),B=this.view.getState(g),k=this.view.getState(n);if(null!=t){var R=null!=B?this.getConnectionConstraint(t,B,!0):null,m=
+null!=k?this.getConnectionConstraint(t,k,!1):null;this.setConnectionConstraint(f,g,!0,m);this.setConnectionConstraint(f,n,!1,R)}c.push(f)}}else if(e.isVertex(f)&&(l=this.getCellGeometry(f),null!=l)){if(!this.isTable(f)&&!this.isTableRow(f)&&!this.isTableCell(f)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var x=l.width;l.width=l.height;l.height=x;e.setGeometry(f,l)}var y=this.view.getState(f);if(null!=y){var K=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
+mxConstants.DIRECTION_NORTH],v=mxUtils.getValue(y.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,K[mxUtils.mod(mxUtils.indexOf(K,v)+(b?-1:1),K.length)],[f])}c.push(f)}}}finally{e.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var n=Graph.prototype.processChange;
+Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var b=a.cell;this.isTableCell(b)&&(b=this.model.getParent(b));this.isTableRow(b)&&(b=this.model.getParent(b));var e=this.view.getState(b);null!=e&&null!=e.shape&&(this.view.invalidate(b),e.shape.bounds=null)}n.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&
"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var e=this.view.getState(a[b]);null!=e&&null!=e.shape&&null!=e.shape.stencil&&this.stencilHasPlaceholders(e.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var e=a.ownerDocument.createElement(null!=
b?b:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)e.setAttribute(attr.nodeName,attr.nodeValue);e.innerHTML=a.innerHTML;a.parentNode.replaceChild(e,a)};Graph.prototype.processElements=function(a,b){if(null!=a)for(var e=a.getElementsByTagName("*"),c=0;c<e.length;c++)b(e[c])};Graph.prototype.updateLabelElements=function(a,b,e){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var f=this.convertValueToString(a[d]);
if(null!=f&&0<f.length){c.innerHTML=f;for(var g=c.getElementsByTagName(null!=e?e:"*"),l=0;l<g.length;l++)b(g[l]);c.innerHTML!=f&&this.cellLabelChanged(a[d],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,b,e){b=Graph.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&
@@ -2600,28 +2600,28 @@ a.sourceState;if(null==b||null==g.getLinkForCell(b.cell))a=g.getCellAt(a.getGrap
this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!g.intersects(this.currentState,b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b))}},mouseUp:function(a,c){for(var d=c.getSource(),l=c.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&
!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==b||b(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,l),c.consume())):null!=e&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-
c.getGraphY())<f&&e(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=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document,
-"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;for(var e=0;e<a.length;e++)this.isTableCell(a[e])&&(a[e]=this.model.getParent(a[e]));a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,f=[];c.beginUpdate();try{for(var g=this.cloneCells(a,!1,null,!0),e=0;e<a.length;e++){var l=c.getParent(a[e]),m=this.moveCells([g[e]],d,d,!1)[0];f.push(m);if(b)c.add(l,g[e]);else{var p=l.getIndex(a[e]);c.add(l,g[e],
-p+1)}if(this.isTable(l)){var u=this.getCellGeometry(g[e]),t=this.getCellGeometry(l);null!=u&&null!=t&&(t=t.clone(),t.height+=u.height,c.setGeometry(l,t))}}}finally{c.endUpdate()}return f};Graph.prototype.insertImage=function(a,b,e){if(null!=a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),d=[],f=0;f<c.length;f++)d.push(c[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(f=
+"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;for(var e=0;e<a.length;e++)this.isTableCell(a[e])&&(a[e]=this.model.getParent(a[e]));a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,f=[];c.beginUpdate();try{for(var g=this.cloneCells(a,!1,null,!0),e=0;e<a.length;e++){var l=c.getParent(a[e]),n=this.moveCells([g[e]],d,d,!1)[0];f.push(n);if(b)c.add(l,g[e]);else{var u=l.getIndex(a[e]);c.add(l,g[e],
+u+1)}if(this.isTable(l)){var p=this.getCellGeometry(g[e]),t=this.getCellGeometry(l);null!=p&&null!=t&&(t=t.clone(),t.height+=p.height,c.setGeometry(l,t))}}}finally{c.endUpdate()}return f};Graph.prototype.insertImage=function(a,b,e){if(null!=a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),d=[],f=0;f<c.length;f++)d.push(c[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(f=
a.length-1;0<=f;f--)if(0==f||a[f]!=d[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",e);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var b=this.cellEditor.textarea.getElementsByTagName("a"),e=[],c=0;c<b.length;c++)e.push(b[c]);document.execCommand("createlink",!1,mxUtils.trim(a));b=this.cellEditor.textarea.getElementsByTagName("a");if(b.length==e.length+1)for(c=b.length-
1;0<=c;c--)if(b[c]!=e[c-1]){for(b=b[c].getElementsByTagName("a");0<b.length;){for(e=b[0].parentNode;null!=b[0].firstChild;)e.insertBefore(b[0].firstChild,b[0]);e.removeChild(b[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),e=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(b||"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==
e[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var e=[],c=null,d=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,l):l,d=null!=d?Math.min(d,l):l;e.push(g)}}if(2<e.length){e.sort(function(b,e){return a?b.x-e.x:b.y-e.y});g=this.view.translate;l=this.view.scale;d=d/l-(a?g.x:g.y);c=c/l-(a?g.x:
-g.y);this.getModel().beginUpdate();try{for(var m=(c-d)/(e.length-1),c=d,f=1;f<e.length-1;f++){var p=this.view.getState(this.model.getParent(e[f].cell)),u=this.getCellGeometry(e[f].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(e[f].cell,u))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};
-Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,m,p){var u=this.useCssTransforms;u&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;e=null!=e?e:0;d=null!=d?d:!0;f=null!=f?f:!0;g=null!=g?g:!0;var t=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));
-var B=this.view.scale,k=mxUtils.createXmlDocument(),n=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=n.style?n.style.backgroundColor=a:n.setAttribute("style","background-color:"+a));null==k.createElementNS?(n.setAttribute("xmlns",mxConstants.NS_SVG),n.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/B;var v=Math.max(1,Math.ceil(t.width*a)+2*e)+(p?5:
-0),y=Math.max(1,Math.ceil(t.height*a)+2*e)+(p?5:0);n.setAttribute("version","1.1");n.setAttribute("width",v+"px");n.setAttribute("height",y+"px");n.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+v+" "+y);k.appendChild(n);var K=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"g"):k.createElement("g");n.appendChild(K);var x=this.createSvgCanvas(K);x.foOffset=d?-.5:0;x.textOffset=d?-.5:0;x.imageOffset=d?-.5:0;x.translate(Math.floor((e/b-t.x)/B),Math.floor((e/b-t.y)/B));var L=document.createElement("div"),
-H=x.getAlternateText;x.getAlternateText=function(a,b,e,c,d,f,g,l,m,p,aa,u,t){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(L.innerHTML=f,f=mxUtils.extractTextWithWhitespace(L.childNodes));for(var Na=Math.ceil(2*c/this.state.fontSize),B=[],k=0,n=0;(0==Na||k<Na)&&n<f.length;){var v=f.charCodeAt(n);if(10==v||13==v){if(0<k)break}else B.push(f.charAt(n)),255>v&&k++;n++}B.length<f.length&&1<f.length-B.length&&(f=mxUtils.trim(B.join(""))+"...");return f}catch(Va){return H.apply(this,
-arguments)}else return H.apply(this,arguments)};var R=this.backgroundImage;if(null!=R){b=B/b;var O=this.view.translate,z=new mxRectangle(O.x*b,O.y*b,R.width*b,R.height*b);mxUtils.intersects(t,z)&&x.image(O.x,O.y,R.width,R.height,R.src,!0)}x.scale(a);x.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,A=l.getLinkForCellState;l.getLinkForCellState=function(a,b){var e=A.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};l.drawCellState=function(a,b){for(var e=
-a.view.graph,c=e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!f&&!c&&null!=d;)c=e.isCellSelected(d),d=e.model.getParent(d);(f||c)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),x);this.updateSvgLinks(n,m,!0);this.addForeignObjectWarning(x,n);return n}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),
+g.y);this.getModel().beginUpdate();try{for(var n=(c-d)/(e.length-1),c=d,f=1;f<e.length-1;f++){var u=this.view.getState(this.model.getParent(e[f].cell)),p=this.getCellGeometry(e[f].cell),c=c+n;null!=p&&null!=u&&(p=p.clone(),a?p.x=Math.round(c-p.width/2)-u.origin.x:p.y=Math.round(c-p.height/2)-u.origin.y,this.getModel().setGeometry(e[f].cell,p))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};
+Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,n,u){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;e=null!=e?e:0;d=null!=d?d:!0;f=null!=f?f:!0;g=null!=g?g:!0;var t=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));
+var B=this.view.scale,k=mxUtils.createXmlDocument(),m=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=m.style?m.style.backgroundColor=a:m.setAttribute("style","background-color:"+a));null==k.createElementNS?(m.setAttribute("xmlns",mxConstants.NS_SVG),m.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):m.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/B;var x=Math.max(1,Math.ceil(t.width*a)+2*e)+(u?5:
+0),y=Math.max(1,Math.ceil(t.height*a)+2*e)+(u?5:0);m.setAttribute("version","1.1");m.setAttribute("width",x+"px");m.setAttribute("height",y+"px");m.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+x+" "+y);k.appendChild(m);var K=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"g"):k.createElement("g");m.appendChild(K);var v=this.createSvgCanvas(K);v.foOffset=d?-.5:0;v.textOffset=d?-.5:0;v.imageOffset=d?-.5:0;v.translate(Math.floor((e/b-t.x)/B),Math.floor((e/b-t.y)/B));var L=document.createElement("div"),
+H=v.getAlternateText;v.getAlternateText=function(a,b,e,c,d,f,g,l,n,u,ca,p,t){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(L.innerHTML=f,f=mxUtils.extractTextWithWhitespace(L.childNodes));for(var Na=Math.ceil(2*c/this.state.fontSize),B=[],k=0,m=0;(0==Na||k<Na)&&m<f.length;){var x=f.charCodeAt(m);if(10==x||13==x){if(0<k)break}else B.push(f.charAt(m)),255>x&&k++;m++}B.length<f.length&&1<f.length-B.length&&(f=mxUtils.trim(B.join(""))+"...");return f}catch(Va){return H.apply(this,
+arguments)}else return H.apply(this,arguments)};var R=this.backgroundImage;if(null!=R){b=B/b;var O=this.view.translate,A=new mxRectangle(O.x*b,O.y*b,R.width*b,R.height*b);mxUtils.intersects(t,A)&&v.image(O.x,O.y,R.width,R.height,R.src,!0)}v.scale(a);v.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,z=l.getLinkForCellState;l.getLinkForCellState=function(a,b){var e=z.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};l.drawCellState=function(a,b){for(var e=
+a.view.graph,c=e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!f&&!c&&null!=d;)c=e.isCellSelected(d),d=e.model.getParent(d);(f||c)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),v);this.updateSvgLinks(m,n,!0);this.addForeignObjectWarning(v,m);return m}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),
c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=
a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);e.appendChild(c);d.appendChild(f);e.appendChild(d);b.appendChild(e)}};Graph.prototype.updateSvgLinks=function(a,b,e){a=a.getElementsByTagName("a");for(var c=0;c<a.length;c++){var d=a[c].getAttribute("href");null==d&&(d=a[c].getAttribute("xlink:href"));null!=d&&(null!=b&&/^https?:\/\//.test(d)?a[c].setAttribute("target",
b):e&&this.isCustomLink(d)&&a[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,e){for(;null!=
a&&a.nodeName!=b;){if(a==e)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,e){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==e)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var e=document.createRange();e.selectNode(a);b.removeAllRanges();b.addRange(e)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),e=
b.createRange(),e.setEndPoint("StartToStart",a),e.select())};Graph.prototype.deleteCells=function(a,b){var e=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++){var d=this.model.getParent(a[c]);if(this.isTable(d)){var f=this.getCellGeometry(a[c]),g=this.getCellGeometry(d);null!=f&&null!=g&&(g=g.clone(),g.height-=f.height,this.model.setGeometry(d,g))}}var l=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,b)}finally{this.model.endUpdate()}if(null!=
l)for(e=[],c=0;c<l.length;c++)this.model.contains(l[c])&&(this.model.isVertex(l[c])||this.model.isEdge(l[c]))&&e.push(l[c])}return e};Graph.prototype.insertTableColumn=function(a,b){var e=this.getModel();e.beginUpdate();try{var c=a,d=0;if(this.isTableCell(a))var f=e.getParent(a),c=e.getParent(f),d=mxUtils.indexOf(e.getChildCells(f,!0),a);else this.isTableRow(a)?c=e.getParent(a):a=e.getChildCells(c,!0)[0],b||(d=e.getChildCells(a,!0).length-1);for(var g=e.getChildCells(c,!0),l=Graph.minTableColumnWidth,
-f=0;f<g.length;f++){var m=e.getChildCells(g[f],!0)[d],p=e.cloneCell(m,!1),u=this.getCellGeometry(p);p.value=null;if(null!=u){var l=u.width,t=this.getCellGeometry(g[f]);null!=t&&(u.height=t.height)}e.add(g[f],p,d+(b?0:1))}var B=this.getCellGeometry(c);null!=B&&(B=B.clone(),B.width+=l,e.setGeometry(c,B))}finally{e.endUpdate()}};Graph.prototype.insertTableRow=function(a,b){var e=this.getModel();e.beginUpdate();try{var c=a,d=a;if(this.isTableCell(a))d=e.getParent(a),c=e.getParent(d);else if(this.isTableRow(a))c=
-e.getParent(a);else var f=e.getChildCells(c,!0),d=f[b?0:f.length-1];var g=e.getChildCells(d,!0),l=c.getIndex(d),d=e.cloneCell(d,!1);d.value=null;var m=this.getCellGeometry(d);if(null!=m){for(f=0;f<g.length;f++){a=e.cloneCell(g[f],!1);d.insert(a);a.value=null;var p=this.getCellGeometry(a);null!=p&&(p.height=m.height)}e.add(c,d,l+(b?0:1));var u=this.getCellGeometry(c);null!=u&&(u=u.clone(),u.height+=m.height,e.setGeometry(c,u))}}finally{e.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var b=
-this.getModel();b.beginUpdate();try{var e=a,c=a;this.isTableCell(a)&&(c=b.getParent(a));this.isTableRow(c)&&(e=b.getParent(c));var d=b.getChildCells(e,!0);if(0==d.length)b.remove(e);else{this.isTableRow(c)||(c=d[0]);var f=b.getChildCells(c,!0);if(1>=f.length)b.remove(e);else{var g=f.length-1;this.isTableCell(a)&&(g=mxUtils.indexOf(f,a));for(c=a=0;c<d.length;c++){var l=b.getChildCells(d[c],!0)[g];b.remove(l);var m=this.getCellGeometry(l);null!=m&&(a=Math.max(a,m.width))}var p=this.getCellGeometry(e);
-null!=p&&(p=p.clone(),p.width-=a,b.setGeometry(e,p))}}}finally{b.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var b=this.getModel();b.beginUpdate();try{var e=a,c=a;this.isTableCell(a)&&(a=c=b.getParent(a));this.isTableRow(a)&&(e=b.getParent(c));var d=b.getChildCells(e,!0);if(1>=d.length)b.remove(e);else{this.isTableRow(c)||(c=d[d.length-1]);b.remove(c);a=0;var f=this.getCellGeometry(c);null!=f&&(a=f.height);var g=this.getCellGeometry(e);null!=g&&(g=g.clone(),g.height-=a,b.setGeometry(e,
+f=0;f<g.length;f++){var n=e.getChildCells(g[f],!0)[d],u=e.cloneCell(n,!1),p=this.getCellGeometry(u);u.value=null;if(null!=p){var l=p.width,t=this.getCellGeometry(g[f]);null!=t&&(p.height=t.height)}e.add(g[f],u,d+(b?0:1))}var B=this.getCellGeometry(c);null!=B&&(B=B.clone(),B.width+=l,e.setGeometry(c,B))}finally{e.endUpdate()}};Graph.prototype.insertTableRow=function(a,b){var e=this.getModel();e.beginUpdate();try{var c=a,d=a;if(this.isTableCell(a))d=e.getParent(a),c=e.getParent(d);else if(this.isTableRow(a))c=
+e.getParent(a);else var f=e.getChildCells(c,!0),d=f[b?0:f.length-1];var g=e.getChildCells(d,!0),l=c.getIndex(d),d=e.cloneCell(d,!1);d.value=null;var n=this.getCellGeometry(d);if(null!=n){for(f=0;f<g.length;f++){a=e.cloneCell(g[f],!1);d.insert(a);a.value=null;var u=this.getCellGeometry(a);null!=u&&(u.height=n.height)}e.add(c,d,l+(b?0:1));var p=this.getCellGeometry(c);null!=p&&(p=p.clone(),p.height+=n.height,e.setGeometry(c,p))}}finally{e.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var b=
+this.getModel();b.beginUpdate();try{var e=a,c=a;this.isTableCell(a)&&(c=b.getParent(a));this.isTableRow(c)&&(e=b.getParent(c));var d=b.getChildCells(e,!0);if(0==d.length)b.remove(e);else{this.isTableRow(c)||(c=d[0]);var f=b.getChildCells(c,!0);if(1>=f.length)b.remove(e);else{var g=f.length-1;this.isTableCell(a)&&(g=mxUtils.indexOf(f,a));for(c=a=0;c<d.length;c++){var l=b.getChildCells(d[c],!0)[g];b.remove(l);var n=this.getCellGeometry(l);null!=n&&(a=Math.max(a,n.width))}var u=this.getCellGeometry(e);
+null!=u&&(u=u.clone(),u.width-=a,b.setGeometry(e,u))}}}finally{b.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var b=this.getModel();b.beginUpdate();try{var e=a,c=a;this.isTableCell(a)&&(a=c=b.getParent(a));this.isTableRow(a)&&(e=b.getParent(c));var d=b.getChildCells(e,!0);if(1>=d.length)b.remove(e);else{this.isTableRow(c)||(c=d[d.length-1]);b.remove(c);a=0;var f=this.getCellGeometry(c);null!=f&&(a=f.height);var g=this.getCellGeometry(e);null!=g&&(g=g.clone(),g.height-=a,b.setGeometry(e,
g))}}finally{b.endUpdate()}};Graph.prototype.insertRow=function(a,b){for(var e=a.tBodies[0],c=e.rows[0].cells,d=0,f=0;f<c.length;f++)var g=c[f].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);e=e.insertRow(b);for(f=0;f<d;f++)mxUtils.br(e.insertCell(-1));return e.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var e=a.tHead;if(null!=e)for(var c=0;c<e.rows.length;c++){var d=document.createElement("th");e.rows[c].appendChild(d);
mxUtils.br(d)}e=a.tBodies[0];for(c=0;c<e.rows.length;c++)d=e.rows[c].insertCell(b),mxUtils.br(d);return e.rows[0].cells[0<=b?b:e.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var e=a.tBodies[0].rows,c=0;c<e.length;c++)e[c].cells.length>b&&e[c].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var e=document.createElement("div");e.innerHTML=
a;a=document.createDocumentFragment();for(var c;c=e.firstChild;)lastNode=a.appendChild(c);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){function e(a,b){a.length>b&&(a=a.substring(0,Math.round(b/2))+"..."+a.substring(a.length-Math.round(b/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==b||0==b.length)b=this.isCustomLink(a)?this.getLinkTitle(a):a;var c=document.createElement("a");c.setAttribute("rel",
@@ -2630,39 +2630,39 @@ this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideM
this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,e=!1,c=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),e=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&
(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(d.getEvent())&&(e&&null==d.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",
this.textarea)};mxCellEditor.prototype.alignText=function(a,b){var e=null!=b&&mxEvent.isShiftDown(b);if(e||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,function(a){e||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=
-window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],e=0,c=a.rangeCount;e<c;++e)b.push(a.getRangeAt(e));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,e=a.length;b<e;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(qa){}};var v=mxCellRenderer.prototype.initializeLabel;
-mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));v.apply(this,arguments)};var t=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?t.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
+window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],e=0,c=a.rangeCount;e<c;++e)b.push(a.getRangeAt(e));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,e=a.length;b<e;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(qa){}};var x=mxCellRenderer.prototype.initializeLabel;
+mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));x.apply(this,arguments)};var t=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?t.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
!1;var y=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){a=this.graph.getStartEditingCell(a,b);y.apply(this,arguments);var e=this.graph.view.getState(a);this.textarea.className=null!=e&&1==e.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var e=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(e)&&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 x=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,e){e.originalNode=a;a=a.firstChild;for(var c=e.firstChild;null!=a&&null!=c;)b(a,
+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 v=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,e){e.originalNode=a;a=a.firstChild;for(var c=e.firstChild;null!=a&&null!=c;)b(a,
c),a=a.nextSibling,c=c.nextSibling;return e}function e(a,b){if(null!=a)if(b.originalNode!=a)c(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var d=a.nextSibling;null==b?c(a):(e(a,b),b=b.nextSibling);a=d}}function c(a){for(var b=a.firstChild;null!=b;){var e=b.nextSibling;c(b);b=e}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)}x.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
-0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?e(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),e=this.saveSelection();if(this.codeViewMode){m=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(b?
-m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&
+(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}v.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
+0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?e(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),e=this.saveSelection();if(this.codeViewMode){n=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<n.length&&"\n"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=this.graph.sanitizeHtml(b?
+n.replace(/\n/g,"<br/>"):n,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&
mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+
-"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m,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 m=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(m=mxUtils.replaceTrailingNewlines(m,"<div><br></div>"));m=this.graph.sanitizeHtml(b?m.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):m,!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!=m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
+"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==
+this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var n=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(n=mxUtils.replaceTrailingNewlines(n,"<div><br></div>"));n=this.graph.sanitizeHtml(b?n.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):n,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+
+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
this.switchSelectionState=e;this.resize()}};var D=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var e=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*e;this.bounds.height=60*e;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)/e)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/e)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/e)+(this.textarea.offsetHeight-
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*e);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/e)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*e);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=e:mxUtils.setPrefixedStyle(this.textarea.style,
"transform","scale("+e+","+e+")")}else this.textarea.style.height="",this.textarea.style.overflow="",D.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var e=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g,"<br/>"));return e=this.graph.sanitizeHtml(e,!0)};
-mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var A=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
-this.toggleViewMode();A.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(R){}};var C=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{C.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};
+mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var z=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
+this.toggleViewMode();z.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(R){}};var C=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{C.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};
mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;
return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(a,b){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(b.getEvent)};mxGraphView.prototype.formatUnitText=function(a){return a?c(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=
a(),this.graph.container.appendChild(this.hint));var e=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-e.x);e=this.roundLength((this.bounds.y+this.currentDy)/d-e.y);d=this.graph.view.unit;this.hint.innerHTML=c(b,d)+", "+c(e,d);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=
-function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,b){z.apply(this,arguments);var e=this.graph.getCellStyle(a);if(null==e.childLayout){var c=this.graph.model.getParent(a),d=null!=c?this.graph.getCellGeometry(c):null;null!=d&&(e=this.graph.getCellStyle(c),"stackLayout"==e.childLayout&&(e="1"==mxUtils.getValue(e,"horizontalStack","1"),d=d.clone(),e?d.height=b.height:d.width=
+function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var A=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,b){A.apply(this,arguments);var e=this.graph.getCellStyle(a);if(null==e.childLayout){var c=this.graph.model.getParent(a),d=null!=c?this.graph.getCellGeometry(c):null;null!=d&&(e=this.graph.getCellStyle(c),"stackLayout"==e.childLayout&&(e="1"==mxUtils.getValue(e,"horizontalStack","1"),d=d.clone(),e?d.height=b.height:d.width=
b.width,this.graph.model.setGeometry(c,d)))}};var E=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){e.get(a)||(e.put(a,!0),d.push(a))}for(var b=E.apply(this,arguments),e=new mxDictionary,c=this.graph.model,d=[],f=0;f<b.length;f++){var g=b[f];this.graph.isTableCell(g)?a(c.getParent(c.getParent(g))):this.graph.isTableRow(g)&&a(c.getParent(g));a(g)}return d};var G=mxVertexHandler.prototype.createParentHighlightShape;
mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=G.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};var F=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var b=F.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+
this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(b.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,
"childLayout",null))&&mxEvent.isControlDown(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var I=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return I.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
this.bounds};var J=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return J.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var u=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||u.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
function(){var a=0;this.graph.isTableRow(this.state.cell)?a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var K=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return K.apply(this,arguments).grow(-this.getSelectionBorderInset())};var B=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var b=this.graph,
-e=b.model,c=this.state,d=this.selectionBorder,f=this;null==a&&(a=[]);var g=b.view.getCellStates(e.getChildCells(this.state.cell,!0));if(0<g.length){for(var l=b.view.getCellStates(e.getChildCells(g[0].cell,!0)),e=0;e<l.length;e++)mxUtils.bind(this,function(e){var g=l[e],m=e<l.length-1?l[e+1]:null,p=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);p.isDashed=d.isDashed;p.svgStrokeTolerance++;p=new mxHandle(g,"col-resize",null,p);p.tableHandle=!0;var u=0;p.shape.node.parentNode.insertBefore(p.shape.node,
-p.shape.node.parentNode.firstChild);p.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=b.getActualStartSize(c.cell);this.shape.stroke=0==u?mxConstants.NONE:d.stroke;this.shape.bounds.x=this.state.x+this.state.width+u*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(e==l.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=c.height-(e==l.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var t=!1;p.setPosition=function(a,e,c){u=
-Math.max(Graph.minTableColumnWidth-a.width,e.x-a.x-a.width);t=mxEvent.isShiftDown(c.getEvent());null==m||t||(u=Math.min((m.x+m.width-g.x-g.width)/b.view.scale-Graph.minTableColumnWidth,u))};p.execute=function(a){if(0!=u)b.setTableColumnWidth(this.state.cell,u,t);else if(!f.blockDelayedSelection){var e=b.getCellAt(a.getGraphX(),a.getGraphY())||c.cell;b.graphHandler.selectCellForEvent(e,a)}u=0};p.reset=function(){u=0};a.push(p)})(e);for(e=0;e<g.length;e++)mxUtils.bind(this,function(e){e=g[e];var l=
-new mxLine(new mxRectangle,mxConstants.NONE,1);l.isDashed=d.isDashed;l.svgStrokeTolerance++;e=new mxHandle(e,"row-resize",null,l);e.tableHandle=!0;var m=0;e.shape.node.parentNode.insertBefore(e.shape.node,e.shape.node.parentNode.firstChild);e.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,
-this.shape.bounds.height=1,this.shape.redraw())};e.setPosition=function(a,b,e){m=Math.max(Graph.minTableRowHeight-a.height,b.y-a.y-a.height)};e.execute=function(a){if(0!=m)b.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(a.getEvent()));else if(!f.blockDelayedSelection){var e=b.getCellAt(a.getGraphX(),a.getGraphY())||c.cell;b.graphHandler.selectCellForEvent(e,a)}m=0};e.reset=function(){m=0};a.push(e)})(e)}}return null!=a?a.reverse():null};var L=mxVertexHandler.prototype.setHandlesVisible;
+e=b.model,c=this.state,d=this.selectionBorder,f=this;null==a&&(a=[]);var g=b.view.getCellStates(e.getChildCells(this.state.cell,!0));if(0<g.length){for(var l=b.view.getCellStates(e.getChildCells(g[0].cell,!0)),e=0;e<l.length;e++)mxUtils.bind(this,function(e){var g=l[e],n=e<l.length-1?l[e+1]:null,u=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);u.isDashed=d.isDashed;u.svgStrokeTolerance++;u=new mxHandle(g,"col-resize",null,u);u.tableHandle=!0;var p=0;u.shape.node.parentNode.insertBefore(u.shape.node,
+u.shape.node.parentNode.firstChild);u.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=b.getActualStartSize(c.cell);this.shape.stroke=0==p?mxConstants.NONE:d.stroke;this.shape.bounds.x=this.state.x+this.state.width+p*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(e==l.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=c.height-(e==l.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var t=!1;u.setPosition=function(a,e,c){p=
+Math.max(Graph.minTableColumnWidth-a.width,e.x-a.x-a.width);t=mxEvent.isShiftDown(c.getEvent());null==n||t||(p=Math.min((n.x+n.width-g.x-g.width)/b.view.scale-Graph.minTableColumnWidth,p))};u.execute=function(a){if(0!=p)b.setTableColumnWidth(this.state.cell,p,t);else if(!f.blockDelayedSelection){var e=b.getCellAt(a.getGraphX(),a.getGraphY())||c.cell;b.graphHandler.selectCellForEvent(e,a)}p=0};u.reset=function(){p=0};a.push(u)})(e);for(e=0;e<g.length;e++)mxUtils.bind(this,function(e){e=g[e];var l=
+new mxLine(new mxRectangle,mxConstants.NONE,1);l.isDashed=d.isDashed;l.svgStrokeTolerance++;e=new mxHandle(e,"row-resize",null,l);e.tableHandle=!0;var n=0;e.shape.node.parentNode.insertBefore(e.shape.node,e.shape.node.parentNode.firstChild);e.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==n?mxConstants.NONE:d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+n*this.graph.view.scale,
+this.shape.bounds.height=1,this.shape.redraw())};e.setPosition=function(a,b,e){n=Math.max(Graph.minTableRowHeight-a.height,b.y-a.y-a.height)};e.execute=function(a){if(0!=n)b.setTableRowHeight(this.state.cell,n,!mxEvent.isShiftDown(a.getEvent()));else if(!f.blockDelayedSelection){var e=b.getCellAt(a.getGraphX(),a.getGraphY())||c.cell;b.graphHandler.selectCellForEvent(e,a)}n=0};e.reset=function(){n=0};a.push(e)})(e)}}return null!=a?a.reverse():null};var L=mxVertexHandler.prototype.setHandlesVisible;
mxVertexHandler.prototype.setHandlesVisible=function(a){L.apply(this,arguments);if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var a=this.graph.model;if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);
this.moveHandles=null}this.moveHandles=[];for(b=0;b<a.getChildCount(this.state.cell);b++)mxUtils.bind(this,function(b){if(null!=b&&a.isVertex(b.cell)){var e=mxUtils.createImage(Editor.rowMoveImage);e.style.position="absolute";e.style.cursor="pointer";e.style.width="7px";e.style.height="4px";e.style.padding="4px 2px 4px 2px";e.rowState=b;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(b.cell)||
this.graph.selectCellForEvent(b.cell,a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),b.cell,a),mxEvent.consume(a))}));
@@ -2685,13 +2685,13 @@ function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mx
function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var fa=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){fa.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=
a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,b){if(this.cancelled)this.cancelled=!1,b.consume();else{var e=null!=this.div&&"none"!=this.div.style.display,c=null,d=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,d=this.first.y,f=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<
-this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(e){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(c,d,this.graph.getDefaultParent(),!0,!0),e=0;e<l.length;e++)if(this.graph.isCellMovable(l[e])){var m=
-this.graph.view.getState(l[e]),p=this.graph.getCellGeometry(l[e]);null!=m&&null!=p&&(p=p.clone(),p.translate(f,g),this.graph.model.setGeometry(l[e],p))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var e=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);e.x-=c.x;e.y-=c.y;
+this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(e){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(c,d,this.graph.getDefaultParent(),!0,!0),e=0;e<l.length;e++)if(this.graph.isCellMovable(l[e])){var n=
+this.graph.view.getState(l[e]),u=this.graph.getCellGeometry(l[e]);null!=n&&null!=u&&(u=u.clone(),u.translate(f,g),this.graph.model.setGeometry(l[e],u))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var e=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);e.x-=c.x;e.y-=c.y;
var c=b.getX()+e.x,e=b.getY()+e.y,d=this.first.x-c,f=this.first.y-e,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,e),this.isSpaceEvent(b)?(c=this.x+this.width,e=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=e-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null)),b.consume()}};var ga=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ga.apply(this,arguments)};var ba=(new Date).getTime(),Y=0,X=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,e,c){X.apply(this,arguments);e!=this.currentTerminalState?(ba=(new Date).getTime(),Y=0):Y=(new Date).getTime()-ba;this.currentTerminalState=
-e};var ca=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<Y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ca.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,b){var e=null!=a&&0==a,c=this.state.getVisibleTerminalState(e),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-
+this.secondDiv=null)),b.consume()}};var ga=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ga.apply(this,arguments)};var aa=(new Date).getTime(),Y=0,X=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,e,c){X.apply(this,arguments);e!=this.currentTerminalState?(aa=(new Date).getTime(),Y=0):Y=(new Date).getTime()-aa;this.currentTerminalState=
+e};var ba=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<Y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ba.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,b){var e=null!=a&&0==a,c=this.state.getVisibleTerminalState(e),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-
1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,e):null,e=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(e),d):null)?this.fixedHandleImage:null!=d&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=e)return e=new mxImageShape(new mxRectangle(0,0,e.width,e.height),e.src),e.preserveImageAspect=!1,e;e=mxConstants.HANDLE_SIZE;this.preferHtml&&--e;return new mxRectangleShape(new mxRectangle(0,0,e,e),mxConstants.HANDLE_FILLCOLOR,
mxConstants.HANDLE_STROKECOLOR)};var ha=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,e){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return ha.apply(this,arguments)};var ea=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),e=b.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);
if(b.isEdge(e)&&null!=c&&c.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return ea.apply(this,arguments)};var U=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=U.apply(this,arguments),b=[],e=0;e<a.length;e++)"1"!=mxUtils.getValue(a[e].style,"part","0")&&b.push(a[e]);return b};var da=mxVertexHandler.prototype.getSelectionBounds;
@@ -2715,80 +2715,80 @@ null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&thi
this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=0;a<this.cornerHandles.length;a++)null!=this.cornerHandles[a]&&null!=this.cornerHandles[a].node&&null!=this.cornerHandles[a].node.parentNode&&this.cornerHandles[a].node.parentNode.removeChild(this.cornerHandles[a].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var oa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(oa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&
null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var W=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Z=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=
-function(){Z.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function q(){mxActor.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function m(){mxActor.call(this)}function l(){mxActor.call(this)}function v(){mxActor.call(this)}function t(){mxActor.call(this)}
+function(){Z.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function q(){mxActor.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function l(){mxActor.call(this)}function x(){mxActor.call(this)}function t(){mxActor.call(this)}
function y(a,b){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,y.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,y.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,y.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,y.prototype.quadTo);this.originalCurveTo=
-this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,y.prototype.arcTo)}function x(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function C(){mxActor.call(this)}function z(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function I(){mxShape.call(this)}function J(){mxShape.call(this)}
-function u(){mxEllipse.call(this)}function K(){mxShape.call(this)}function B(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function O(){mxShape.call(this)}function H(){mxShape.call(this)}function S(){mxShape.call(this)}function fa(){mxShape.call(this)}function ga(){mxShape.call(this)}function ba(){mxCylinder.call(this)}function Y(){mxCylinder.call(this)}function X(){mxRectangleShape.call(this)}function ca(){mxDoubleEllipse.call(this)}function ha(){mxDoubleEllipse.call(this)}function ea(){mxArrowConnector.call(this);
+this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,y.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function C(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function I(){mxShape.call(this)}function J(){mxShape.call(this)}
+function u(){mxEllipse.call(this)}function K(){mxShape.call(this)}function B(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function O(){mxShape.call(this)}function H(){mxShape.call(this)}function S(){mxShape.call(this)}function fa(){mxShape.call(this)}function ga(){mxShape.call(this)}function aa(){mxCylinder.call(this)}function Y(){mxCylinder.call(this)}function X(){mxRectangleShape.call(this)}function ba(){mxDoubleEllipse.call(this)}function ha(){mxDoubleEllipse.call(this)}function ea(){mxArrowConnector.call(this);
this.spacing=0}function U(){mxArrowConnector.call(this);this.spacing=0}function da(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}function la(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxActor.call(this)}function ja(){mxActor.call(this)}function sa(){mxActor.call(this)}function N(){mxActor.call(this)}function oa(){mxActor.call(this)}function W(){mxActor.call(this)}function Z(){mxActor.call(this)}function R(){mxEllipse.call(this)}
-function ia(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxActor.call(this)}function ya(){mxActor.call(this)}function ma(){mxActor.call(this)}function ta(){mxConnector.call(this)}function Ba(a,b,e,c,d,f,g,l,m,p){g+=m;var aa=c.clone();c.x-=d*(2*g+m);c.y-=f*(2*g+m);d*=g+m;f*=g+m;return function(){a.ellipse(aa.x-
-d-g,aa.y-f-g,2*g,2*g);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,b,e,c,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-b,-e));this.paintForeground(a,
-b,e,c,d)};a.prototype.paintForeground=function(a,b,e,c,d){if(null!=this.state){var f=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var aa=f,f=g,g=aa;a.rotate(-this.getShapeRotation(),f,g,b+c/2,e+d/2);s=this.scale;b=this.bounds.x/s;e=this.bounds.y/s;c=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,b,e,c,d)}};a.prototype.paintTableForeground=function(a,b,e,c,d){var f=this.state.view.graph,g=f.getActualStartSize(this.state.cell),
-aa=f.model.getChildCells(this.state.cell,!0);if(0<aa.length){var l="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(l)for(l=1;l<aa.length;l++){var p=f.getCellGeometry(aa[l]);null!=p&&(a.begin(),a.moveTo(b+g.x,e+p.y),a.lineTo(b+c-g.width,e+p.y),a.end(),a.stroke())}if(m)for(c=f.model.getChildCells(aa[0],!0),l=1;l<c.length;l++)p=f.getCellGeometry(c[l]),null!=p&&(a.begin(),a.moveTo(b+p.x+g.x,e+g.y),a.lineTo(b+p.x+g.x,e+d-g.height),a.end(),
-a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.max(0,Math.min(c,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),aa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
-a.translate(b,e);a.begin();a.moveTo(0,0);a.lineTo(c-f,0);a.lineTo(c,f);a.lineTo(c,d);a.lineTo(f,d);a.lineTo(0,d-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(c-f,0),a.lineTo(c,f),a.lineTo(f,f),a.close(),a.fill()),0!=aa&&(a.setFillAlpha(Math.abs(aa)),a.setFillColor(0>aa?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,d),a.lineTo(0,d-
+function ia(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxActor.call(this)}function ya(){mxActor.call(this)}function ma(){mxActor.call(this)}function ta(){mxConnector.call(this)}function Ba(a,b,e,c,d,f,g,l,n,u){g+=n;var ca=c.clone();c.x-=d*(2*g+n);c.y-=f*(2*g+n);d*=g+n;f*=g+n;return function(){a.ellipse(ca.x-
+d-g,ca.y-f-g,2*g,2*g);u?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,b,e,c,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-b,-e));this.paintForeground(a,
+b,e,c,d)};a.prototype.paintForeground=function(a,b,e,c,d){if(null!=this.state){var f=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var ca=f,f=g,g=ca;a.rotate(-this.getShapeRotation(),f,g,b+c/2,e+d/2);s=this.scale;b=this.bounds.x/s;e=this.bounds.y/s;c=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,b,e,c,d)}};a.prototype.paintTableForeground=function(a,b,e,c,d){var f=this.state.view.graph,g=f.getActualStartSize(this.state.cell),
+ca=f.model.getChildCells(this.state.cell,!0);if(0<ca.length){var l="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),n="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(l)for(l=1;l<ca.length;l++){var u=f.getCellGeometry(ca[l]);null!=u&&(a.begin(),a.moveTo(b+g.x,e+u.y),a.lineTo(b+c-g.width,e+u.y),a.end(),a.stroke())}if(n)for(c=f.model.getChildCells(ca[0],!0),l=1;l<c.length;l++)u=f.getCellGeometry(c[l]),null!=u&&(a.begin(),a.moveTo(b+u.x+g.x,e+g.y),a.lineTo(b+u.x+g.x,e+d-g.height),a.end(),
+a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.max(0,Math.min(c,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ca=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
+a.translate(b,e);a.begin();a.moveTo(0,0);a.lineTo(c-f,0);a.lineTo(c,f);a.lineTo(c,d);a.lineTo(f,d);a.lineTo(0,d-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(c-f,0),a.lineTo(c,f),a.lineTo(f,f),a.close(),a.fill()),0!=ca&&(a.setFillAlpha(Math.abs(ca)),a.setFillColor(0>ca?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,d),a.lineTo(0,d-
f),a.close(),a.fill()),a.begin(),a.moveTo(f,d),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(c,f),a.end(),a.stroke())};c.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",c);var ua=Math.tan(mxUtils.toRadians(30)),na=(.5-ua)/2;mxUtils.extend(f,mxActor);f.prototype.size=20;f.prototype.redrawPath=function(a,b,e,c,d){b=
Math.min(c,d/ua);a.translate((c-b)/2,(d-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*na);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-na)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",f);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,e,c,d,f){b=Math.min(c,d/(.5+ua));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-na)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-na)*b),a.lineTo(.5*b,(1-na)*b)):(a.translate((c-b)/2,(d-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*
b,b*na),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-na)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(a,b,e,c,d,f){b=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,c,2*b,c,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,c,2*b,c,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),
-a.curveTo(0,2*b,c,2*b,c,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,c,-b/3,c,b),a.lineTo(c,d-b),a.curveTo(c,d+b/3,0,d+b/3,0,d-b),a.close())};k.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",k);mxUtils.extend(n,mxCylinder);n.prototype.size=30;n.prototype.darkOpacity=0;n.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.max(0,
+a.curveTo(0,2*b,c,2*b,c,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,c,-b/3,c,b),a.lineTo(c,d-b),a.curveTo(c,d+b/3,0,d+b/3,0,d-b),a.close())};k.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",k);mxUtils.extend(m,mxCylinder);m.prototype.size=30;m.prototype.darkOpacity=0;m.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.max(0,
Math.min(c,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,e);a.begin();a.moveTo(0,0);a.lineTo(c-f,0);a.lineTo(c,f);a.lineTo(c,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(c-f,0),a.lineTo(c-f,f),a.lineTo(c,f),a.close(),
-a.fill()),a.begin(),a.moveTo(c-f,0),a.lineTo(c-f,f),a.lineTo(c,f),a.end(),a.stroke())};mxCellRenderer.registerShape("note",n);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,e,c,d){a.moveTo(0,0);a.quadTo(c/2,.5*d,c,0);a.quadTo(.5*c,d/2,c,d);a.quadTo(c/2,.5*d,0,d);a.quadTo(.5*c,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(b,mxCylinder);b.prototype.tabWidth=60;b.prototype.tabHeight=20;b.prototype.tabPosition="right";b.prototype.redrawPath=function(a,b,e,c,
+a.fill()),a.begin(),a.moveTo(c-f,0),a.lineTo(c-f,f),a.lineTo(c,f),a.end(),a.stroke())};mxCellRenderer.registerShape("note",m);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,e,c,d){a.moveTo(0,0);a.quadTo(c/2,.5*d,c,0);a.quadTo(.5*c,d/2,c,d);a.quadTo(c/2,.5*d,0,d);a.quadTo(.5*c,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(b,mxCylinder);b.prototype.tabWidth=60;b.prototype.tabHeight=20;b.prototype.tabPosition="right";b.prototype.redrawPath=function(a,b,e,c,
d,f){b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);f?"left"==g?(a.moveTo(0,e),a.lineTo(b,e)):(a.moveTo(c-b,e),a.lineTo(c,e)):("left"==g?(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,e),a.lineTo(c,e)):(a.moveTo(0,e),a.lineTo(c-b,e),a.lineTo(c-b,0),a.lineTo(c,0)),a.lineTo(c,d),a.lineTo(0,d),a.lineTo(0,
e),a.close());a.end()};mxCellRenderer.registerShape("folder",b);mxUtils.extend(e,mxActor);e.prototype.size=30;e.prototype.isRoundable=function(){return!0};e.prototype.redrawPath=function(a,b,e,c,d){b=Math.max(0,Math.min(c,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint(0,d),new mxPoint(0,b)],this.isRounded,e,!0);
a.end()};mxCellRenderer.registerShape("card",e);mxUtils.extend(g,mxActor);g.prototype.size=.4;g.prototype.redrawPath=function(a,b,e,c,d){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(c/4,1.4*b,c/2,b/2);a.quadTo(3*c/4,b*(1-1.4),c,b/2);a.lineTo(c,d-b/2);a.quadTo(3*c/4,d-1.4*b,c/2,d-b/2);a.quadTo(c/4,d-b*(1-1.4),0,d-b/2);a.lineTo(0,b/2);a.close();a.end()};g.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",
!1)){var b=mxUtils.getValue(this.style,"size",this.size),e=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=c,new mxRectangle(a.x,a.y+b,e,c-2*b);b*=e;return new mxRectangle(a.x+b,a.y,e-2*b,c)}return a};mxCellRenderer.registerShape("tape",g);mxUtils.extend(p,mxActor);p.prototype.size=.3;p.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};p.prototype.redrawPath=function(a,b,e,c,d){b=d*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,d-b/2);a.quadTo(3*c/4,d-1.4*b,c/2,d-b/2);a.quadTo(c/4,d-b*(1-1.4),0,d-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",p);var Ia=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,e,c){var d=mxUtils.getValue(this.style,"size");return null!=
-d?c*Math.max(0,Math.min(1,d)):Ia.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c-b,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(l,mxActor);l.prototype.size=.2;l.prototype.isRoundable=function(){return!0};l.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,d)],this.isRounded,e,!0)};mxCellRenderer.registerShape("trapezoid",l);mxUtils.extend(v,mxActor);v.prototype.size=.5;v.prototype.redrawPath=function(a,b,e,c,d){a.setFillColor(null);b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d/2),new mxPoint(0,d/2),new mxPoint(b,d/2),new mxPoint(b,d),new mxPoint(c,d)],this.isRounded,e,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",v);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,e,c,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=c/5;a.rect(0,0,b,d);a.fillAndStroke();a.rect(2*b,0,b,d);a.fillAndStroke();a.rect(4*b,0,b,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);y.prototype.moveTo=
+d?c*Math.max(0,Math.min(1,d)):Ia.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.isRoundable=function(){return!0};n.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
+e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c-b,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("parallelogram",n);mxUtils.extend(l,mxActor);l.prototype.size=.2;l.prototype.isRoundable=function(){return!0};l.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,d)],this.isRounded,e,!0)};mxCellRenderer.registerShape("trapezoid",l);mxUtils.extend(x,mxActor);x.prototype.size=.5;x.prototype.redrawPath=function(a,b,e,c,d){a.setFillColor(null);b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d/2),new mxPoint(0,d/2),new mxPoint(b,d/2),new mxPoint(b,d),new mxPoint(c,d)],this.isRounded,e,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",x);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,e,c,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=c/5;a.rect(0,0,b,d);a.fillAndStroke();a.rect(2*b,0,b,d);a.fillAndStroke();a.rect(4*b,0,b,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);y.prototype.moveTo=
function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};y.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)};y.prototype.quadTo=function(a,b,e,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=c};y.prototype.curveTo=function(a,b,e,c,d,f){this.originalCurveTo.apply(this.canvas,
-arguments);this.lastX=d;this.lastY=f};y.prototype.arcTo=function(a,b,e,c,d,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};y.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var e=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),d=Math.abs(b-this.lastY),f=Math.sqrt(c*c+d*d);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),aa=this.defaultVariation;
-5>g&&(g=5,aa/=3);for(var l=e(a-this.lastX)*c/g,e=e(b-this.lastY)*d/g,c=c/f,d=d/f,f=0;f<g;f++){var m=(Math.random()-.5)*aa;this.originalLineTo.call(this.canvas,l*f+this.lastX-m*d,e*f+this.lastY-m*c)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};y.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;
+arguments);this.lastX=d;this.lastY=f};y.prototype.arcTo=function(a,b,e,c,d,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};y.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var e=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),d=Math.abs(b-this.lastY),f=Math.sqrt(c*c+d*d);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),l=this.defaultVariation;
+5>g&&(g=5,l/=3);for(var ca=e(a-this.lastX)*c/g,e=e(b-this.lastY)*d/g,c=c/f,d=d/f,f=0;f<g;f++){var n=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,ca*f+this.lastX-n*d,e*f+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};y.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};mxShape.prototype.defaultJiggle=1.5;var Ja=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Ja.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Pa=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Pa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new y(a,
mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var Qa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?
"1":"0"))&&Qa.apply(this,arguments)};var Ra=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,e,c,d){if(null==a.handJiggle||a.handJiggle.constructor!=y)Ra.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),
a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(c/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(c*f,d*f)),a.moveTo(b+f,e),a.lineTo(b+c-f,e),a.quadTo(b+c,e,b+c,e+f),a.lineTo(b+c,e+d-f),a.quadTo(b+c,e+d,b+c-f,e+d),a.lineTo(b+f,e+d),a.quadTo(b,e+d,b,e+d-f),a.lineTo(b,e+f),a.quadTo(b,
-e,b+f,e)):(a.moveTo(b,e),a.lineTo(b+c,e),a.lineTo(b+c,e+d),a.lineTo(b,e+d),a.lineTo(b,e)),a.close(),a.end(),a.fillAndStroke()}};var Sa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,e,c,d){null==a.handJiggle&&Sa.apply(this,arguments)};mxUtils.extend(x,mxRectangleShape);x.prototype.size=.1;x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
-this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,e=a.height;a=new mxRectangle(a.x,a.y,b,e);var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(b*d,e*d));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};x.prototype.paintForeground=function(a,
-b,e,c,d){var f=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,f=Math.max(f,Math.min(c*g,d*g));f=Math.round(f);a.begin();a.moveTo(b+f,e);a.lineTo(b+f,e+d);a.moveTo(b+c-f,e);a.lineTo(b+c-f,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",x);mxUtils.extend(D,mxRectangleShape);
-D.prototype.paintBackground=function(a,b,e,c,d){a.setFillColor(mxConstants.NONE);a.rect(b,e,c,d);a.fill()};D.prototype.paintForeground=function(a,b,e,c,d){};mxCellRenderer.registerShape("transparent",D);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};A.prototype.isRoundable=function(){return!0};
-A.prototype.redrawPath=function(a,b,e,c,d){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,
-[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d-e),new mxPoint(Math.min(c,f+l),d-e),new mxPoint(g,d),new mxPoint(Math.max(0,f),d-e),new mxPoint(0,d-e)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,b,e,c,d){b="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))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-b,0),new mxPoint(c,d/2),new mxPoint(c-b,d),new mxPoint(0,d),new mxPoint(b,d/2)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("step",C);mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.prototype.fixedSize=20;z.prototype.isRoundable=function(){return!0};
-z.prototype.redrawPath=function(a,b,e,c,d){b="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))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,.5*d),new mxPoint(c-b,d),new mxPoint(b,d),new mxPoint(0,.5*d)],this.isRounded,e,!0)};
-mxCellRenderer.registerShape("hexagon",z);mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.paintForeground=function(a,b,e,c,d){var f=Math.min(c/5,d/5)+1;a.begin();a.moveTo(b+c/2,e+f);a.lineTo(b+c/2,e+d-f);a.moveTo(b+f,e+d/2);a.lineTo(b+c-f,e+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",E);var La=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
+e,b+f,e)):(a.moveTo(b,e),a.lineTo(b+c,e),a.lineTo(b+c,e+d),a.lineTo(b,e+d),a.lineTo(b,e)),a.close(),a.end(),a.fillAndStroke()}};var Sa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,e,c,d){null==a.handJiggle&&Sa.apply(this,arguments)};mxUtils.extend(v,mxRectangleShape);v.prototype.size=.1;v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
+this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,e=a.height;a=new mxRectangle(a.x,a.y,b,e);var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(b*d,e*d));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};v.prototype.paintForeground=function(a,
+b,e,c,d){var f=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,f=Math.max(f,Math.min(c*g,d*g));f=Math.round(f);a.begin();a.moveTo(b+f,e);a.lineTo(b+f,e+d);a.moveTo(b+c-f,e);a.lineTo(b+c-f,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",v);mxUtils.extend(D,mxRectangleShape);
+D.prototype.paintBackground=function(a,b,e,c,d){a.setFillColor(mxConstants.NONE);a.rect(b,e,c,d);a.fill()};D.prototype.paintForeground=function(a,b,e,c,d){};mxCellRenderer.registerShape("transparent",D);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};z.prototype.isRoundable=function(){return!0};
+z.prototype.redrawPath=function(a,b,e,c,d){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,
+[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d-e),new mxPoint(Math.min(c,f+l),d-e),new mxPoint(g,d),new mxPoint(Math.max(0,f),d-e),new mxPoint(0,d-e)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,b,e,c,d){b="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))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-b,0),new mxPoint(c,d/2),new mxPoint(c-b,d),new mxPoint(0,d),new mxPoint(b,d/2)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("step",C);mxUtils.extend(A,mxHexagon);A.prototype.size=.25;A.prototype.fixedSize=20;A.prototype.isRoundable=function(){return!0};
+A.prototype.redrawPath=function(a,b,e,c,d){b="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))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,.5*d),new mxPoint(c-b,d),new mxPoint(b,d),new mxPoint(0,.5*d)],this.isRounded,e,!0)};
+mxCellRenderer.registerShape("hexagon",A);mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.paintForeground=function(a,b,e,c,d){var f=Math.min(c/5,d/5)+1;a.begin();a.moveTo(b+c/2,e+f);a.lineTo(b+c/2,e+d-f);a.moveTo(b+f,e+d/2);a.lineTo(b+c-f,e+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",E);var La=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,e,c,d){La.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;e+=f;c-=2*f;d-=2*f;0<c&&0<d&&(a.setShadow(!1),La.apply(this,[a,b,e,c,d]))}};mxUtils.extend(G,
mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};G.prototype.paintForeground=function(a,b,e,c,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);b+=f;e+=f;c-=2*f;d-=2*f;0<c&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=g){var l=this.style["symbol"+f+"Align"],m=this.style["symbol"+f+"VerticalAlign"],p=this.style["symbol"+f+"Width"],aa=this.style["symbol"+f+"Height"],u=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"VSpacing"]||u,B=this.style["symbol"+f+"ArcSpacing"];null!=B&&(B*=this.getArcSize(c+this.strokewidth,
-d+this.strokewidth),u+=B,t+=B);var B=b,k=e,B=l==mxConstants.ALIGN_CENTER?B+(c-p)/2:l==mxConstants.ALIGN_RIGHT?B+(c-p-u):B+u,k=m==mxConstants.ALIGN_MIDDLE?k+(d-aa)/2:m==mxConstants.ALIGN_BOTTOM?k+(d-aa-t):k+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,B,k,p,aa);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",G);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,e,c,d,f){f?
+0);b+=f;e+=f;c-=2*f;d-=2*f;0<c&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=g){var l=this.style["symbol"+f+"Align"],n=this.style["symbol"+f+"VerticalAlign"],u=this.style["symbol"+f+"Width"],ca=this.style["symbol"+f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"VSpacing"]||p,B=this.style["symbol"+f+"ArcSpacing"];null!=B&&(B*=this.getArcSize(c+this.strokewidth,
+d+this.strokewidth),p+=B,t+=B);var B=b,k=e,B=l==mxConstants.ALIGN_CENTER?B+(c-u)/2:l==mxConstants.ALIGN_RIGHT?B+(c-u-p):B+p,k=n==mxConstants.ALIGN_MIDDLE?k+(d-ca)/2:n==mxConstants.ALIGN_BOTTOM?k+(d-ca-t):k+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,B,k,u,ca);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",G);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,e,c,d,f){f?
(a.moveTo(0,0),a.lineTo(c/2,d/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(I,mxShape);I.prototype.paintBackground=function(a,b,e,c,d){a.translate(b,e);a.ellipse(c/4,0,c/2,d/4);a.fillAndStroke();a.begin();a.moveTo(c/2,d/4);a.lineTo(c/2,2*d/3);a.moveTo(c/2,d/3);a.lineTo(0,d/3);a.moveTo(c/2,d/3);a.lineTo(c,d/3);a.moveTo(c/2,2*d/3);a.lineTo(0,d);a.moveTo(c/2,2*d/3);a.lineTo(c,d);a.end();a.stroke()};
mxCellRenderer.registerShape("umlActor",I);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};J.prototype.paintBackground=function(a,b,e,c,d){a.translate(b,e);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(c/6,d/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(u,mxEllipse);u.prototype.paintVertexShape=function(a,b,
e,c,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+c/8,e+d);a.lineTo(b+7*c/8,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",u);mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,b,e,c,d){a.translate(b,e);a.begin();a.moveTo(c,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(c,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",K);mxUtils.extend(B,mxShape);B.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
a.height/8,a.width,7*a.height/8)};B.prototype.paintBackground=function(a,b,e,c,d){a.translate(b,e);a.begin();a.moveTo(3*c/8,d/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,d/8,c,7*d/8);a.fillAndStroke()};B.prototype.paintForeground=function(a,b,e,c,d){a.begin();a.moveTo(3*c/8,d/8*1.1);a.lineTo(5*c/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",B);mxUtils.extend(L,mxRectangleShape);L.prototype.size=40;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.getLabelBounds=
function(a){var b=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,b)};L.prototype.paintBackground=function(a,b,e,c,d){var f=Math.max(0,Math.min(d,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,b,e,c,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=L&&(g=new g,
g.apply(this.state),a.save(),g.paintVertexShape(a,b,e,c,f),a.restore()));f<d&&(a.setDashed(!0),a.begin(),a.moveTo(b+c/2,e+f),a.lineTo(b+c/2,e+d),a.end(),a.stroke())};L.prototype.paintForeground=function(a,b,e,c,d){var f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,e,c,Math.min(d,f))};mxCellRenderer.registerShape("umlLifeline",L);mxUtils.extend(O,mxShape);O.prototype.width=60;O.prototype.height=30;O.prototype.corner=
-10;O.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))};O.prototype.paintBackground=function(a,b,e,c,d){var f=this.corner,g=Math.min(c,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(d,Math.max(1.5*f,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(b,e,c,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,b,e,c,d),a.setGradient(this.fill,this.gradient,b,e,c,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,e);a.lineTo(b+g,e);a.lineTo(b+g,e+Math.max(0,l-1.5*f));a.lineTo(b+Math.max(0,g-f),e+l);a.lineTo(b,e+l);a.close();a.fillAndStroke();a.begin();
+10;O.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))};O.prototype.paintBackground=function(a,b,e,c,d){var f=this.corner,g=Math.min(c,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(d,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,
+mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(b,e,c,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,b,e,c,d),a.setGradient(this.fill,this.gradient,b,e,c,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,e);a.lineTo(b+g,e);a.lineTo(b+g,e+Math.max(0,l-1.5*f));a.lineTo(b+Math.max(0,g-f),e+l);a.lineTo(b,e+l);a.close();a.fillAndStroke();a.begin();
a.moveTo(b+g,e);a.lineTo(b+c,e);a.lineTo(b+c,e+d);a.lineTo(b,e+d);a.lineTo(b,e+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",O);mxPerimeter.LifelinePerimeter=function(a,b,e,c){c=L.prototype.size;null!=b&&(c=mxUtils.getValue(b.style,"size",c)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;e.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+c,e.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);
mxPerimeter.OrthogonalPerimeter=function(a,b,e,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,e,c){c=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(c+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return e.x<
-a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,e.y)));e.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,e.x)),a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,e,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",A.prototype.size))*
-b.view.scale))),b.style),b,e,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,e,c){var d=m.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d));var f=a.x,g=a.y,l=a.width,p=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+
-l,g+d),new mxPoint(f+l,g+p),new mxPoint(f,g+p-d),new mxPoint(f,g)]):(d=l*Math.max(0,Math.min(1,d)),g=[new mxPoint(f+d,g),new mxPoint(f+l,g),new mxPoint(f+l-d,g+p),new mxPoint(f,g+p),new mxPoint(f+d,g)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(e.x<f||e.x>f+l?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(g,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,e,c){var d=l.prototype.size;null!=b&&(d=
-mxUtils.getValue(b.style,"size",d));var f=a.x,g=a.y,m=a.width,p=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(d=m*Math.max(0,Math.min(1,d)),g=[new mxPoint(f+d,g),new mxPoint(f+m-d,g),new mxPoint(f+m,g+p),new mxPoint(f,g+p),new mxPoint(f+d,g)]):b==mxConstants.DIRECTION_WEST?(d=m*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+m,g),new mxPoint(f+m-d,g+p),new mxPoint(f+d,g+p),new mxPoint(f,
-g)]):b==mxConstants.DIRECTION_NORTH?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g+d),new mxPoint(f+m,g),new mxPoint(f+m,g+p),new mxPoint(f,g+p-d),new mxPoint(f,g+d)]):(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+m,g+d),new mxPoint(f+m,g+p-d),new mxPoint(f,g+p),new mxPoint(f,g)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(e.x<f||e.x>f+m?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(g,a,e)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);
-mxPerimeter.StepPerimeter=function(a,b,e,c){var d="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=d?C.prototype.fixedSize:C.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));d&&(f*=b.view.scale);var g=a.x,l=a.y,m=a.width,p=a.height,u=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,
-l),new mxPoint(g+m-d,l),new mxPoint(g+m,a),new mxPoint(g+m-d,l+p),new mxPoint(g,l+p),new mxPoint(g+d,a),new mxPoint(g,l)]):b==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),l=[new mxPoint(g+d,l),new mxPoint(g+m,l),new mxPoint(g+m-d,a),new mxPoint(g+m,l+p),new mxPoint(g+d,l+p),new mxPoint(g,a),new mxPoint(g+d,l)]):b==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(p,f)):p*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,l+d),new mxPoint(u,l),new mxPoint(g+m,l+
-d),new mxPoint(g+m,l+p),new mxPoint(u,l+p-d),new mxPoint(g,l+p),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(p,f)):p*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,l),new mxPoint(u,l+d),new mxPoint(g+m,l),new mxPoint(g+m,l+p-d),new mxPoint(u,l+p),new mxPoint(g,l+p-d),new mxPoint(g,l)]);u=new mxPoint(u,a);c&&(e.x<g||e.x>g+m?u.y=e.y:u.x=e.x);return mxUtils.getPerimeterPoint(l,u,e)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,e,c){var d=
-"0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=d?z.prototype.fixedSize:z.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));var g=a.x,l=a.y,m=a.width,p=a.height,u=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(p,f)):p*Math.max(0,Math.min(1,f)),l=[new mxPoint(u,l),new mxPoint(g+m,l+d),new mxPoint(g+
-m,l+p-d),new mxPoint(u,l+p),new mxPoint(g,l+p-d),new mxPoint(g,l+d),new mxPoint(u,l)]):(d=d?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),l=[new mxPoint(g+d,l),new mxPoint(g+m-d,l),new mxPoint(g+m,a),new mxPoint(g+m-d,l+p),new mxPoint(g+d,l+p),new mxPoint(g,a),new mxPoint(g+d,l)]);u=new mxPoint(u,a);c&&(e.x<g||e.x>g+m?u.y=e.y:u.x=e.x);return mxUtils.getPerimeterPoint(l,u,e)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(H,mxShape);H.prototype.size=
+a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,e.y)));e.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,e.x)),a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,e,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",z.prototype.size))*
+b.view.scale))),b.style),b,e,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,e,c){var d=n.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d));var f=a.x,g=a.y,l=a.width,u=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(d=u*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+
+l,g+d),new mxPoint(f+l,g+u),new mxPoint(f,g+u-d),new mxPoint(f,g)]):(d=l*Math.max(0,Math.min(1,d)),g=[new mxPoint(f+d,g),new mxPoint(f+l,g),new mxPoint(f+l-d,g+u),new mxPoint(f,g+u),new mxPoint(f+d,g)]);u=a.getCenterX();a=a.getCenterY();a=new mxPoint(u,a);c&&(e.x<f||e.x>f+l?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(g,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,e,c){var d=l.prototype.size;null!=b&&(d=
+mxUtils.getValue(b.style,"size",d));var f=a.x,g=a.y,n=a.width,u=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(f+d,g),new mxPoint(f+n-d,g),new mxPoint(f+n,g+u),new mxPoint(f,g+u),new mxPoint(f+d,g)]):b==mxConstants.DIRECTION_WEST?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+n,g),new mxPoint(f+n-d,g+u),new mxPoint(f+d,g+u),new mxPoint(f,
+g)]):b==mxConstants.DIRECTION_NORTH?(d=u*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g+d),new mxPoint(f+n,g),new mxPoint(f+n,g+u),new mxPoint(f,g+u-d),new mxPoint(f,g+d)]):(d=u*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+n,g+d),new mxPoint(f+n,g+u-d),new mxPoint(f,g+u),new mxPoint(f,g)]);u=a.getCenterX();a=a.getCenterY();a=new mxPoint(u,a);c&&(e.x<f||e.x>f+n?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(g,a,e)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);
+mxPerimeter.StepPerimeter=function(a,b,e,c){var d="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=d?C.prototype.fixedSize:C.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));d&&(f*=b.view.scale);var g=a.x,l=a.y,n=a.width,u=a.height,p=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(n,f)):n*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,
+l),new mxPoint(g+n-d,l),new mxPoint(g+n,a),new mxPoint(g+n-d,l+u),new mxPoint(g,l+u),new mxPoint(g+d,a),new mxPoint(g,l)]):b==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(n,f)):n*Math.max(0,Math.min(1,f)),l=[new mxPoint(g+d,l),new mxPoint(g+n,l),new mxPoint(g+n-d,a),new mxPoint(g+n,l+u),new mxPoint(g+d,l+u),new mxPoint(g,a),new mxPoint(g+d,l)]):b==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(u,f)):u*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,l+d),new mxPoint(p,l),new mxPoint(g+n,l+
+d),new mxPoint(g+n,l+u),new mxPoint(p,l+u-d),new mxPoint(g,l+u),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(u,f)):u*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,l),new mxPoint(p,l+d),new mxPoint(g+n,l),new mxPoint(g+n,l+u-d),new mxPoint(p,l+u),new mxPoint(g,l+u-d),new mxPoint(g,l)]);p=new mxPoint(p,a);c&&(e.x<g||e.x>g+n?p.y=e.y:p.x=e.x);return mxUtils.getPerimeterPoint(l,p,e)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,e,c){var d=
+"0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=d?A.prototype.fixedSize:A.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));var g=a.x,l=a.y,n=a.width,u=a.height,p=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(u,f)):u*Math.max(0,Math.min(1,f)),l=[new mxPoint(p,l),new mxPoint(g+n,l+d),new mxPoint(g+
+n,l+u-d),new mxPoint(p,l+u),new mxPoint(g,l+u-d),new mxPoint(g,l+d),new mxPoint(p,l)]):(d=d?Math.max(0,Math.min(n,f)):n*Math.max(0,Math.min(1,f)),l=[new mxPoint(g+d,l),new mxPoint(g+n-d,l),new mxPoint(g+n,a),new mxPoint(g+n-d,l+u),new mxPoint(g+d,l+u),new mxPoint(g,a),new mxPoint(g+d,l)]);p=new mxPoint(p,a);c&&(e.x<g||e.x>g+n?p.y=e.y:p.x=e.x);return mxUtils.getPerimeterPoint(l,p,e)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(H,mxShape);H.prototype.size=
10;H.prototype.paintBackground=function(a,b,e,c,d){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,e);a.ellipse((c-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(c/2,f);a.lineTo(c/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",H);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.inset=2;S.prototype.paintBackground=function(a,b,e,c,d){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",
this.inset))+this.strokewidth;a.translate(b,e);a.begin();a.moveTo(c/2,f+g);a.lineTo(c/2,d);a.end();a.stroke();a.begin();a.moveTo((c-f)/2-g,f/2);a.quadTo((c-f)/2-g,f+g,c/2,f+g);a.quadTo((c+f)/2+g,f+g,(c+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",S);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(a,b,e,c,d){a.translate(b,e);a.begin();a.moveTo(0,0);a.quadTo(c,0,c,d/2);a.quadTo(c,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",
-fa);mxUtils.extend(ga,mxShape);ga.prototype.inset=2;ga.prototype.paintBackground=function(a,b,e,c,d){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,e);a.ellipse(0,f,c-2*f,d-2*f);a.fillAndStroke();a.begin();a.moveTo(c/2,0);a.quadTo(c,0,c,d/2);a.quadTo(c,d,c/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ga);mxUtils.extend(ba,mxCylinder);ba.prototype.jettyWidth=20;ba.prototype.jettyHeight=10;ba.prototype.redrawPath=
-function(a,b,e,c,d,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=g/2;var g=e+g/2,l=Math.min(b,d-b),m=Math.min(l+2*b,d-b);f?(a.moveTo(e,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(e,l+b),a.moveTo(e,m),a.lineTo(g,m),a.lineTo(g,m+b),a.lineTo(e,m+b)):(a.moveTo(e,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(e,d),a.lineTo(e,m+b),a.lineTo(0,m+b),a.lineTo(0,m),a.lineTo(e,m),a.lineTo(e,l+b),a.lineTo(0,l+b),
-a.lineTo(0,l),a.lineTo(e,l),a.close());a.end()};mxCellRenderer.registerShape("module",ba);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.prototype.redrawPath=function(a,b,e,c,d,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=g/2;var g=e+g/2,l=.3*d-b/2,m=.7*d-b/2;f?(a.moveTo(e,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(e,l+b),a.moveTo(e,m),a.lineTo(g,m),a.lineTo(g,
-m+b),a.lineTo(e,m+b)):(a.moveTo(e,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(e,d),a.lineTo(e,m+b),a.lineTo(0,m+b),a.lineTo(0,m),a.lineTo(e,m),a.lineTo(e,l+b),a.lineTo(0,l+b),a.lineTo(0,l),a.lineTo(e,l),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(X,mxRectangleShape);X.prototype.paintForeground=function(a,b,e,c,d){var f=c/2,g=d/2,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,e),new mxPoint(b+
-c,e+g),new mxPoint(b+f,e+d),new mxPoint(b,e+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",X);mxUtils.extend(ca,mxDoubleEllipse);ca.prototype.outerStroke=!0;ca.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.min(4,Math.min(c/5,d/5));0<c&&0<d&&(a.ellipse(b+f,e+f,c-2*f,d-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,e,c,d),a.stroke())};mxCellRenderer.registerShape("endState",
-ca);mxUtils.extend(ha,ca);ha.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ha);mxUtils.extend(ea,mxArrowConnector);ea.prototype.defaultWidth=4;ea.prototype.isOpenEnded=function(){return!0};ea.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ea.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ea);mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=
+fa);mxUtils.extend(ga,mxShape);ga.prototype.inset=2;ga.prototype.paintBackground=function(a,b,e,c,d){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,e);a.ellipse(0,f,c-2*f,d-2*f);a.fillAndStroke();a.begin();a.moveTo(c/2,0);a.quadTo(c,0,c,d/2);a.quadTo(c,d,c/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ga);mxUtils.extend(aa,mxCylinder);aa.prototype.jettyWidth=20;aa.prototype.jettyHeight=10;aa.prototype.redrawPath=
+function(a,b,e,c,d,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=g/2;var g=e+g/2,l=Math.min(b,d-b),n=Math.min(l+2*b,d-b);f?(a.moveTo(e,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(e,l+b),a.moveTo(e,n),a.lineTo(g,n),a.lineTo(g,n+b),a.lineTo(e,n+b)):(a.moveTo(e,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(e,d),a.lineTo(e,n+b),a.lineTo(0,n+b),a.lineTo(0,n),a.lineTo(e,n),a.lineTo(e,l+b),a.lineTo(0,l+b),
+a.lineTo(0,l),a.lineTo(e,l),a.close());a.end()};mxCellRenderer.registerShape("module",aa);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.prototype.redrawPath=function(a,b,e,c,d,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=g/2;var g=e+g/2,l=.3*d-b/2,n=.7*d-b/2;f?(a.moveTo(e,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(e,l+b),a.moveTo(e,n),a.lineTo(g,n),a.lineTo(g,
+n+b),a.lineTo(e,n+b)):(a.moveTo(e,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(e,d),a.lineTo(e,n+b),a.lineTo(0,n+b),a.lineTo(0,n),a.lineTo(e,n),a.lineTo(e,l+b),a.lineTo(0,l+b),a.lineTo(0,l),a.lineTo(e,l),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(X,mxRectangleShape);X.prototype.paintForeground=function(a,b,e,c,d){var f=c/2,g=d/2,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,e),new mxPoint(b+
+c,e+g),new mxPoint(b+f,e+d),new mxPoint(b,e+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",X);mxUtils.extend(ba,mxDoubleEllipse);ba.prototype.outerStroke=!0;ba.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.min(4,Math.min(c/5,d/5));0<c&&0<d&&(a.ellipse(b+f,e+f,c-2*f,d-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,e,c,d),a.stroke())};mxCellRenderer.registerShape("endState",
+ba);mxUtils.extend(ha,ba);ha.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ha);mxUtils.extend(ea,mxArrowConnector);ea.prototype.defaultWidth=4;ea.prototype.isOpenEnded=function(){return!0};ea.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ea.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ea);mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=
10;U.prototype.defaultArrowWidth=20;U.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};U.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",U);mxUtils.extend(da,mxActor);
da.prototype.size=30;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(a,b,e,c,d){b=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,b),new mxPoint(c,0),new mxPoint(c,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("manualInput",da);mxUtils.extend(Q,mxRectangleShape);Q.prototype.dx=20;Q.prototype.dy=20;
Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.paintForeground=function(a,b,e,c,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*g,d*g));g=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,
@@ -2811,56 +2811,56 @@ c/2,e+d)):(a.moveTo(b,e+d/2),a.lineTo(b+c,e+d/2));a.end();a.stroke()};mxCellRend
"size",this.size))));b=(d-f)/2;e=b+f;var g=(c-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(c,b);a.lineTo(c,e);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(g,d);a.lineTo(g,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(ma,mxActor);ma.prototype.size=.25;ma.prototype.redrawPath=function(a,b,e,c,d){b=Math.min(c,d/2);e=Math.min(c-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.moveTo(0,d/2);a.lineTo(e,
0);a.lineTo(c-b,0);a.quadTo(c,0,c,d/2);a.quadTo(c,d,c-b,d);a.lineTo(e,d);a.close();a.end()};mxCellRenderer.registerShape("display",ma);mxUtils.extend(ta,mxConnector);ta.prototype.origPaintEdgeShape=ta.prototype.paintEdgeShape;ta.prototype.paintEdgeShape=function(a,b,e){for(var c=[],d=0;d<b.length;d++)c.push(mxUtils.clone(b[d]));var d=a.state.dashed,f=a.state.fixDash;ta.prototype.origPaintEdgeShape.apply(this,[a,c,e]);3<=a.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&
(a.setStrokeColor(c),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,f),ta.prototype.origPaintEdgeShape.apply(this,[a,b,e])))};mxCellRenderer.registerShape("filledEdge",ta);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),e=a.apply(this,arguments);"umlFrame"==b.style.shape&&e.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});
-return e}}();mxMarker.addMarker("dash",function(a,b,e,c,d,f,g,l,m,p){var u=d*(g+m+1),t=f*(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("box",function(a,b,e,c,d,f,g,l,m,p){var u=d*(g+m+1),t=f*(g+m+1),B=c.x+u/2,k=c.y+t/2;c.x-=u;c.y-=t;return function(){a.begin();a.moveTo(B-u/2-t/2,k-t/2+u/2);a.lineTo(B-u/2+t/2,k-t/2-u/2);a.lineTo(B+t/2-3*u/2,k-3*t/2-u/2);a.lineTo(B-t/2-3*u/2,k-3*t/2+u/2);a.close();p?a.fillAndStroke():
-a.stroke()}});mxMarker.addMarker("cross",function(a,b,e,c,d,f,g,l,m,p){var u=d*(g+m+1),t=f*(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",Ba);mxMarker.addMarker("circlePlus",function(a,b,e,c,d,f,g,l,m,p){var u=c.clone(),t=Ba.apply(this,arguments),B=d*(g+2*m),k=f*(g+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(u.x-
-d*m,u.y-f*m);a.lineTo(u.x-2*B+d*m,u.y-2*k+f*m);a.moveTo(u.x-B-k+f*m,u.y-k+B-d*m);a.lineTo(u.x+k-B-f*m,u.y-k-B+d*m);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,e,c,d,f,g,l,m,p){var u=d*(g+m+1),t=f*(g+m+1),B=c.clone();c.x-=u;c.y-=t;return function(){a.begin();a.moveTo(B.x-t,B.y+u);a.quadTo(c.x-t,c.y+u,c.x,c.y);a.quadTo(c.x+t,c.y-u,B.x+t,B.y-u);a.stroke()}});mxMarker.addMarker("async",function(a,b,e,c,d,f,g,l,m,p){b=d*m*1.118;e=f*m*1.118;d*=g+m;f*=g+m;var u=c.clone();u.x-=b;u.y-=e;c.x+=
-1*-d-b;c.y+=1*-f-e;return function(){a.begin();a.moveTo(u.x,u.y);l?a.lineTo(u.x-d-f/2,u.y-f+d/2):a.lineTo(u.x+f/2-d,u.y-f-d/2);a.lineTo(u.x-d,u.y-f);a.close();p?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,e,c,d,f,g,l,m,p,u){f*=l+p;g*=l+p;var t=d.clone();return function(){b.begin();b.moveTo(t.x,t.y);m?b.lineTo(t.x-f-g/a,t.y-g+f/a):b.lineTo(t.x+g/a-f,t.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Oa=function(a,
-b,e){return Da(a,["width"],b,function(b,c,d,f,g){g=a.shape.getEdgeWidth()*a.view.scale+e;return new mxPoint(f.x+c*b/4+d*g/2,f.y+d*b/4-c*g/2)},function(b,c,d,f,g,l){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*b)/a.view.scale-e})},Da=function(a,b,e,c,d){return V(a,b,function(b){var d=a.absolutePoints,f=d.length-1;b=a.view.translate;var g=a.view.scale,l=e?d[0]:d[f],d=e?d[1]:d[f-1],f=d.x-l.x,m=d.y-l.y,p=Math.sqrt(f*f+m*m),l=c.call(this,p,f/p,m/p,l,d);return new mxPoint(l.x/
-g-b.x,l.y/g-b.y)},function(b,c,f){var g=a.absolutePoints,l=g.length-1;b=a.view.translate;var m=a.view.scale,p=e?g[0]:g[l],g=e?g[1]:g[l-1],l=g.x-p.x,u=g.y-p.y,t=Math.sqrt(l*l+u*u);c.x=(c.x+b.x)*m;c.y=(c.y+b.y)*m;d.call(this,t,l/t,u/t,p,g,c,f)})},za=function(a){return function(b){return[V(b,["arrowWidth","arrowSize"],function(b){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",T.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));
+return e}}();mxMarker.addMarker("dash",function(a,b,e,c,d,f,g,l,n,u){var p=d*(g+n+1),t=f*(g+n+1);return function(){a.begin();a.moveTo(c.x-p/2-t/2,c.y-t/2+p/2);a.lineTo(c.x+t/2-3*p/2,c.y-3*t/2-p/2);a.stroke()}});mxMarker.addMarker("box",function(a,b,e,c,d,f,g,l,n,u){var p=d*(g+n+1),t=f*(g+n+1),B=c.x+p/2,k=c.y+t/2;c.x-=p;c.y-=t;return function(){a.begin();a.moveTo(B-p/2-t/2,k-t/2+p/2);a.lineTo(B-p/2+t/2,k-t/2-p/2);a.lineTo(B+t/2-3*p/2,k-3*t/2-p/2);a.lineTo(B-t/2-3*p/2,k-3*t/2+p/2);a.close();u?a.fillAndStroke():
+a.stroke()}});mxMarker.addMarker("cross",function(a,b,e,c,d,f,g,l,n,u){var p=d*(g+n+1),t=f*(g+n+1);return function(){a.begin();a.moveTo(c.x-p/2-t/2,c.y-t/2+p/2);a.lineTo(c.x+t/2-3*p/2,c.y-3*t/2-p/2);a.moveTo(c.x-p/2+t/2,c.y-t/2-p/2);a.lineTo(c.x-t/2-3*p/2,c.y-3*t/2+p/2);a.stroke()}});mxMarker.addMarker("circle",Ba);mxMarker.addMarker("circlePlus",function(a,b,e,c,d,f,g,l,n,u){var p=c.clone(),t=Ba.apply(this,arguments),B=d*(g+2*n),k=f*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(p.x-
+d*n,p.y-f*n);a.lineTo(p.x-2*B+d*n,p.y-2*k+f*n);a.moveTo(p.x-B-k+f*n,p.y-k+B-d*n);a.lineTo(p.x+k-B-f*n,p.y-k-B+d*n);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,e,c,d,f,g,l,n,u){var p=d*(g+n+1),t=f*(g+n+1),B=c.clone();c.x-=p;c.y-=t;return function(){a.begin();a.moveTo(B.x-t,B.y+p);a.quadTo(c.x-t,c.y+p,c.x,c.y);a.quadTo(c.x+t,c.y-p,B.x+t,B.y-p);a.stroke()}});mxMarker.addMarker("async",function(a,b,e,c,d,f,g,l,n,u){b=d*n*1.118;e=f*n*1.118;d*=g+n;f*=g+n;var p=c.clone();p.x-=b;p.y-=e;c.x+=
+1*-d-b;c.y+=1*-f-e;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-d-f/2,p.y-f+d/2):a.lineTo(p.x+f/2-d,p.y-f-d/2);a.lineTo(p.x-d,p.y-f);a.close();u?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,e,c,d,f,g,l,n,u,p){f*=l+u;g*=l+u;var t=d.clone();return function(){b.begin();b.moveTo(t.x,t.y);n?b.lineTo(t.x-f-g/a,t.y-g+f/a):b.lineTo(t.x+g/a-f,t.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Oa=function(a,
+b,e){return Da(a,["width"],b,function(b,c,d,f,g){g=a.shape.getEdgeWidth()*a.view.scale+e;return new mxPoint(f.x+c*b/4+d*g/2,f.y+d*b/4-c*g/2)},function(b,c,d,f,g,l){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*b)/a.view.scale-e})},Da=function(a,b,e,c,d){return V(a,b,function(b){var d=a.absolutePoints,f=d.length-1;b=a.view.translate;var g=a.view.scale,l=e?d[0]:d[f],d=e?d[1]:d[f-1],f=d.x-l.x,n=d.y-l.y,u=Math.sqrt(f*f+n*n),l=c.call(this,u,f/u,n/u,l,d);return new mxPoint(l.x/
+g-b.x,l.y/g-b.y)},function(b,c,f){var g=a.absolutePoints,l=g.length-1;b=a.view.translate;var n=a.view.scale,u=e?g[0]:g[l],g=e?g[1]:g[l-1],l=g.x-u.x,p=g.y-u.y,t=Math.sqrt(l*l+p*p);c.x=(c.x+b.x)*n;c.y=(c.y+b.y)*n;d.call(this,t,l/t,p/t,u,g,c,f)})},za=function(a){return function(b){return[V(b,["arrowWidth","arrowSize"],function(b){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",T.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));
return new mxPoint(b.x+(1-c)*b.width,b.y+(1-e)*b.height/2)},function(b,e){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-e.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-e.x)/b.width))})]}},Ka=function(a,b,e){return function(c){var d=[V(c,["size"],function(e){var c=Math.max(0,Math.min(e.width,Math.min(e.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(e.x+c,e.y+c)},function(b,e){this.state.style.size=Math.round(Math.max(0,
Math.min(Math.min(b.width,e.x-b.x),Math.min(b.height,e.y-b.y)))/a)},!1)];e&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(va(c));return d}},Ea=function(a,b,e,c,d){e=null!=e?e:1;return function(f){var g=[V(f,["size"],function(b){var e=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",e?d:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,c*(e?1:b.width))),b.getCenterY())},function(a,b,c){a=null!=d&&"0"!=mxUtils.getValue(this.state.style,
"fixedSize","0")?b.x-a.x:Math.max(0,Math.min(e,(b.x-a.x)/a.width));this.state.style.size=a},!1,c)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(va(f));return g}},Ma=function(a){return function(b){var e=[V(b,["size"],function(b){var e=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(b.x+e*b.width*.75,b.y+b.height/4)},function(b,e){this.state.style.size=Math.max(0,Math.min(a,(e.x-b.x)/(.75*b.width)))},!1,!0)];mxUtils.getValue(b.style,
mxConstants.STYLE_ROUNDED,!1)&&e.push(va(b));return e}},Ca=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b}},va=function(a,b){return V(a,[mxConstants.STYLE_ARCSIZE],function(e){var c=null!=b?b:e.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(e.x+e.width-Math.min(e.width/2,d),e.y+c)}d=Math.max(0,
parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(e.x+e.width-Math.min(Math.max(e.width/2,e.height/2),Math.min(e.width,e.height)*d),e.y+c)},function(b,e,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-e.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-
-e.x+b.x)/Math.min(b.width,b.height))))})},V=function(a,b,e,c,d,f,g){var l=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);l.execute=function(a){for(var e=0;e<b.length;e++)this.copyStyle(b[e]);g&&g(a)};l.getPosition=e;l.setPosition=c;l.ignoreGrid=null!=d?d:!0;if(f){var m=l.positionChanged;l.positionChanged=function(){m.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return l},Fa={link:function(a){return[Oa(a,!0,10),Oa(a,!1,10)]},flexArrow:function(a){var b=
+e.x+b.x)/Math.min(b.width,b.height))))})},V=function(a,b,e,c,d,f,g){var l=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);l.execute=function(a){for(var e=0;e<b.length;e++)this.copyStyle(b[e]);g&&g(a)};l.getPosition=e;l.setPosition=c;l.ignoreGrid=null!=d?d:!0;if(f){var n=l.positionChanged;l.positionChanged=function(){n.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return l},Fa={link:function(a){return[Oa(a,!0,10),Oa(a,!1,10)]},flexArrow:function(a){var b=
a.view.graph.gridSize/a.view.scale,e=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Da(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,e,c,d,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)+c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)-e*
-b/2)},function(e,c,d,f,g,l,m){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/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]))<
-b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),e.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,e,c,d,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)+c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)-e*b/2)},function(e,c,d,f,g,l,m){e=
-Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
+b/2)},function(e,c,d,f,g,l,n){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<
+b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),e.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,e,c,d,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)+c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)-e*b/2)},function(e,c,d,f,g,l,n){e=
+Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Da(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,e,c,d,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,
-mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)-c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)+e*b/2)},function(e,c,d,f,g,l,m){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/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]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),e.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,e,c,d,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)-c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)+e*b/2)},function(e,c,d,f,g,l,m){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*e)-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]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return e},swimlane:function(a){var b=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var e=
+mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)-c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)+e*b/2)},function(e,c,d,f,g,l,n){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=
+a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),e.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,e,c,d,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
+5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)-c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)+e*b/2)},function(e,c,d,f,g,l,n){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=
+a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return e},swimlane:function(a){var b=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var e=
parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(va(a,e/2))}b.push(V(a,[mxConstants.STYLE_STARTSIZE],function(b){var e=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,e))):new mxPoint(b.x+Math.max(0,Math.min(b.width,e)),b.getCenterY())},function(b,e){a.style[mxConstants.STYLE_STARTSIZE]=
1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,e.y-b.y))):Math.round(Math.max(0,Math.min(b.width,e.x-b.x)))},!1,null,function(b){if(mxEvent.isControlDown(b.getEvent())&&(b=a.view.graph,b.isTableRow(a.cell)||b.isTableCell(a.cell))){for(var e=b.getSwimlaneDirection(a.style),c=b.model.getParent(a.cell),c=b.model.getChildCells(c,!0),d=[],f=0;f<c.length;f++)c[f]!=a.cell&&b.isSwimlane(c[f])&&b.getSwimlaneDirection(b.getCurrentCellStyle(c[f]))==
e&&d.push(c[f]);b.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return b},label:Ca(),ext:Ca(),rectangle:Ca(),triangle:Ca(),rhombus:Ca(),umlLifeline:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[V(a,
["width","height"],function(a){var b=Math.max(O.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",O.prototype.width))),e=Math.max(1.5*O.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",O.prototype.height)));return new mxPoint(a.x+b,a.y+e)},function(a,b){this.state.style.width=Math.round(Math.max(O.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*O.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},
-process:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},cross:function(a){return[V(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",ya.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var e=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/e*2,Math.max(0,a.getCenterX()-b.x)/e*2)))})]},note:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=
+process:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},cross:function(a){return[V(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",ya.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var e=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/e*2,Math.max(0,a.getCenterX()-b.x)/e*2)))})]},note:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=
Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",da.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},dataStorage:function(a){return[V(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",sa.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))},!1)]},callout:function(a){var b=[V(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));
-mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(a.x+e*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),V(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+
-b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),V(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",A.prototype.base)));return new mxPoint(a.x+Math.min(a.width,e*a.width+c),a.y+a.height-
-b)},function(a,b){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-e*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},internalStorage:function(a){var b=[V(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",Q.prototype.dy)));return new mxPoint(a.x+b,a.y+e)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},module:function(a){return[V(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",ba.prototype.jettyWidth))),e=Math.max(0,Math.min(a.height,
-mxUtils.getValue(this.state.style,"jettyHeight",ba.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*e)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[V(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",sa.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))},!1)]},callout:function(a){var b=[V(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));
+mxUtils.getValue(this.state.style,"base",z.prototype.base);return new mxPoint(a.x+e*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",z.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),V(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",z.prototype.position2)));return new mxPoint(a.x+
+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),V(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",z.prototype.base)));return new mxPoint(a.x+Math.min(a.width,e*a.width+c),a.y+a.height-
+b)},function(a,b){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-e*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},internalStorage:function(a){var b=[V(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"dy",Q.prototype.dy)));return new mxPoint(a.x+b,a.y+e)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},module:function(a){return[V(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",aa.prototype.jettyWidth))),e=Math.max(0,Math.min(a.height,
+mxUtils.getValue(this.state.style,"jettyHeight",aa.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*e)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[V(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
"dy",M.prototype.dy)));return new mxPoint(a.x+b,a.y+e)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},tee:function(a){return[V(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",P.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+e)},function(a,
b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},singleArrow:za(1),doubleArrow:za(.5),folder:function(a){return[V(a,["tabWidth","tabHeight"],function(a){var e=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",b.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",b.prototype.tabHeight)));mxUtils.getValue(this.state.style,
"tabPosition",b.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(e=a.width-e);return new mxPoint(a.x+e,a.y+c)},function(a,e){var c=Math.max(0,Math.min(a.width,e.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",b.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,e.y-a.y)))},!1)]},document:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
"size",p.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},tape:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))},!1)]},offPageConnector:function(a){return[V(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},step:Ea(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ea(z.prototype.size,!0,.5,!0,z.prototype.fixedSize),curlyBracket:Ea(v.prototype.size,!1),display:Ea(ma.prototype.size,!1),cube:Ka(1,c.prototype.size,!1),card:Ka(.5,
+["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},step:Ea(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ea(A.prototype.size,!0,.5,!0,A.prototype.fixedSize),curlyBracket:Ea(x.prototype.size,!1),display:Ea(ma.prototype.size,!1),cube:Ka(1,c.prototype.size,!1),card:Ka(.5,
e.prototype.size,!0),loopLimit:Ka(.5,W.prototype.size,!0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=V;Graph.handleFactory=Fa;var Ta=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Ta.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)?b=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
(b=mxConstants.SHAPE_SWIMLANE);b=Fa[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&(b=Fa[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Fa[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
{};var Ga=new mxPoint(1,0),Ha=new mxPoint(1,0),za=mxUtils.toRadians(-30),Ga=mxUtils.getRotatedPoint(Ga,Math.cos(za),Math.sin(za)),za=mxUtils.toRadians(-150),Ha=mxUtils.getRotatedPoint(Ha,Math.cos(za),Math.sin(za));mxEdgeStyle.IsometricConnector=function(a,b,e,c,d){var f=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=c&&(c=f.transformControlPoint(a,c));null==l&&null!=b&&(l=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=e&&(g=new mxPoint(e.getCenterX(),
-e.getCenterY()));var m=Ga.x,p=Ga.y,u=Ha.x,t=Ha.y,B="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,b,e){a-=k.x;var c=b-k.y;b=(t*a-u*c)/(m*t-p*u);a=(p*a-m*c)/(p*u-m*t);B?(e&&(k=new mxPoint(k.x+m*b,k.y+p*b),d.push(k)),k=new mxPoint(k.x+u*a,k.y+t*a)):(e&&(k=new mxPoint(k.x+u*a,k.y+t*a),d.push(k)),k=new mxPoint(k.x+m*b,k.y+p*b));d.push(k)};var k=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
+e.getCenterY()));var n=Ga.x,u=Ga.y,p=Ha.x,t=Ha.y,B="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,b,e){a-=k.x;var c=b-k.y;b=(t*a-p*c)/(n*t-u*p);a=(u*a-n*c)/(u*p-n*t);B?(e&&(k=new mxPoint(k.x+n*b,k.y+u*b),d.push(k)),k=new mxPoint(k.x+p*a,k.y+t*a)):(e&&(k=new mxPoint(k.x+p*a,k.y+t*a),d.push(k)),k=new mxPoint(k.x+n*b,k.y+u*b));d.push(k)};var k=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
mxEdgeStyle.IsometricConnector);var Ua=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var e=new mxElbowEdgeHandler(a);e.snapToTerminals=!1;return e}return Ua.apply(this,arguments)};f.prototype.constraints=[];d.prototype.getConstraints=function(a,b,e){a=[];var c=Math.tan(mxUtils.toRadians(30)),d=(.5-c)/2,c=Math.min(b,e/(.5+c));b=(b-c)/2;e=(e-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,b+.5*c,e+c*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+c,e+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+c,e+.75*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*c,e+(1-d)*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e+.75*c));return a};A.prototype.getConstraints=function(a,b,e){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+0),!1,null,b+.5*c,e+c*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+c,e+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+c,e+.75*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*c,e+(1-d)*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e+.75*c));return a};z.prototype.getConstraints=function(a,b,e){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-c)));b>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),
new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];wa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;E.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.getConstraints=
+0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];wa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;E.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.getConstraints=
function(a,b,e){a=[];var c=Math.max(0,Math.min(b,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,.5*(e+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};e.prototype.getConstraints=function(a,b,e){a=[];var c=Math.max(0,Math.min(b,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e+c)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
@@ -2871,8 +2871,8 @@ function(a,b,e){a=[];var c=Math.max(0,Math.min(b,Math.min(e,parseFloat(mxUtils.g
0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,.5*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};Q.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;
ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;xa.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.getConstraints=function(a,b,e){a=[];var c=Math.min(b,e/2),d=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+b-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+b-c),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));return a};ba.prototype.getConstraints=
-function(a,b,e){b=parseFloat(mxUtils.getValue(a,"jettyWidth",ba.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",ba.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
+.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+b-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+b-c),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));return a};aa.prototype.getConstraints=
+function(a,b,e){b=parseFloat(mxUtils.getValue(a,"jettyWidth",aa.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",aa.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(e-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(e-.5*a,3.5*a))];e>5*a&&c.push(new mxConnectionConstraint(new mxPoint(0,
.75),!1,null,b));e>8*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b));e>15*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return c};W.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,
.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.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)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,
@@ -2885,7 +2885,7 @@ function(a,b,e){b=parseFloat(mxUtils.getValue(a,"jettyWidth",ba.prototype.jettyW
[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)];m.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+.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)];n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=mxRectangleShape.prototype.constraints;p.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;P.prototype.getConstraints=function(a,b,e){a=[];var c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
"dx",this.dx)))),d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*c,d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(b+c),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+c),.5*(e+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+c),e));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c),.5*(e+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c),d));a.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2905,8 +2905,8 @@ Actions.prototype.init=function(){function a(a){d.escape();a=d.deleteCells(d.get
"import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,e){try{var b=mxUtils.parseXml(a);f.graph.setSelectionCells(f.graph.importGraphModel(b.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+
"+S").isEnabled=k;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,
300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(b){c.handleError(b)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var c=0;c<b.length&&a;c++)a=a&&d.model.isEdge(b[c]);var f=d.view.translate,m=d.view.scale,l=f.x,k=f.y,f=null;if(1==b.length&&a){var t=d.getCellGeometry(b[0]);
-null!=t&&(f=t.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var n=Math.round(d.snap(d.popupMenuHandler.triggerX/m-l)),x=Math.round(d.snap(d.popupMenuHandler.triggerY/m-k));d.cellsMoved(b,n-f.x,x-f.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var c=0;c<b.length&&a;c++)a=a&&d.model.isEdge(b[c]);var f=d.view.translate,n=d.view.scale,l=f.x,k=f.y,f=null;if(1==b.length&&a){var t=d.getCellGeometry(b[0]);
+null!=t&&(f=t.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var m=Math.round(d.snap(d.popupMenuHandler.triggerX/n-l)),v=Math.round(d.snap(d.popupMenuHandler.triggerY/n-k));d.cellsMoved(b,m-f.x,v-f.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=c.copiedSize){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(a=0;a<b.length;a++)if(d.getModel().isVertex(b[a])){var f=d.getCellGeometry(b[a]);null!=f&&(f=f.clone(),f.width=c.copiedSize.width,f.height=c.copiedSize.height,d.getModel().setGeometry(b[a],f))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(b){c.handleError(b)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a){d.turnShapes(d.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices(null,
!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,
@@ -2917,10 +2917,10 @@ c.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip.
null!=a&&d.openLink(a)});this.addAction("editLink...",function(){var a=c.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var e=a.getSelectionCell(),d=a.getLinkForCell(e)||"";c.showLinkDialog(d,mxResources.get("apply"),function(b){b=mxUtils.trim(b);a.setLinkForCell(e,0<b.length?b:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),c.actions.get("image").funct())})).isEnabled=
k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&c.showLinkDialog("",mxResources.get("insert"),function(a,e){a=mxUtils.trim(a);if(0<a.length){var b=null,c=d.getLinkTitle(a);null!=e&&0<e.length&&(b=e[0].iconUrl,c=e[0].name||e[0].type,c=c.charAt(0).toUpperCase()+c.substring(1),30<c.length&&(c=c.substring(0,30)+"..."));b=new mxCell(c,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=
b?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+b:"spacing=10;"));b.vertex=!0;c=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([b],!0));b.geometry.x=c.x;b.geometry.y=c.y;d.setLinkForCell(b,a);d.cellSizeUpdated(b,!0);d.getModel().beginUpdate();try{b=d.addCell(b),d.fireEvent(new mxEventObject("cellsInserted","cells",[b]))}finally{d.getModel().endUpdate()}d.setSelectionCell(b);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,
-function(){var a=c.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var e=a.getSelectedElement(),d=a.getParentByName(e,"A",a.cellEditor.textarea),f="";if(null==d&&null!=e&&null!=e.getElementsByTagName)for(var m=e.getElementsByTagName("a"),l=0;l<m.length&&null==d;l++)m[l].textContent==e.textContent&&(d=m[l]);null!=d&&"A"==d.nodeName&&(f=d.getAttribute("href")||"",a.selectNode(d));var k=a.cellEditor.saveSelection();c.showLinkDialog(f,mxResources.get("apply"),mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(k);
-null!=b&&a.insertLink(b)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var e=0;e<a.length;e++){var c=a[e];if(d.getModel().getChildCount(c))d.updateGroupBounds([c],20);else{var f=d.view.getState(c),m=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=f&&null!=f.text&&null!=m&&d.isWrapping(c)?(m=m.clone(),m.height=f.text.boundingBox.height/
-d.view.scale,d.getModel().setGeometry(c,m)):d.updateCellSize(c)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var e=d.getSelectionCells(),f=0;f<e.length;f++)if(state=d.getView().getState(e[f]),null!=state){var p=mxUtils.getValue(state.style,"html","0");if("1"==p&&null==a){var m=d.convertValueToString(state.cell);
-"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var l=document.createElement("div");l.innerHTML=d.sanitizeHtml(m);m=mxUtils.extractTextWithWhitespace(l.childNodes);d.cellLabelChanged(state.cell,m);d.setCellStyles("html",a,[e[f]])}else"0"==p&&"1"==a&&(m=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(m)),d.setCellStyles("html",
+function(){var a=c.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var e=a.getSelectedElement(),d=a.getParentByName(e,"A",a.cellEditor.textarea),f="";if(null==d&&null!=e&&null!=e.getElementsByTagName)for(var n=e.getElementsByTagName("a"),l=0;l<n.length&&null==d;l++)n[l].textContent==e.textContent&&(d=n[l]);null!=d&&"A"==d.nodeName&&(f=d.getAttribute("href")||"",a.selectNode(d));var k=a.cellEditor.saveSelection();c.showLinkDialog(f,mxResources.get("apply"),mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(k);
+null!=b&&a.insertLink(b)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var e=0;e<a.length;e++){var c=a[e];if(d.getModel().getChildCount(c))d.updateGroupBounds([c],20);else{var f=d.view.getState(c),n=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=f&&null!=f.text&&null!=n&&d.isWrapping(c)?(n=n.clone(),n.height=f.text.boundingBox.height/
+d.view.scale,d.getModel().setGeometry(c,n)):d.updateCellSize(c)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var e=d.getSelectionCells(),f=0;f<e.length;f++)if(state=d.getView().getState(e[f]),null!=state){var p=mxUtils.getValue(state.style,"html","0");if("1"==p&&null==a){var n=d.convertValueToString(state.cell);
+"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(n=n.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var l=document.createElement("div");l.innerHTML=d.sanitizeHtml(n);n=mxUtils.extractTextWithWhitespace(l.childNodes);d.cellLabelChanged(state.cell,n);d.setCellStyles("html",a,[e[f]])}else"0"==p&&"1"==a&&(n=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(n=n.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(n)),d.setCellStyles("html",
a,[e[f]]))}c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",e))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),e="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(e=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,e)});this.addAction("rotation",function(){var a="0",e=d.getView().getState(d.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||
a);a=new FilenameDialog(c,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");c.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);c.resetScrollbars()},null,null,"Home");this.addAction("zoomIn",function(a){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,c.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
this.addAction("zoomOut",function(a){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,c.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),e=d.view.translate,f=d.view.scale;a.x=a.x/f-e.x;a.y=a.y/f-e.y;a.width/=f;a.height/=f;null!=d.backgroundImage&&a.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height));0==a.width||0==a.height?(d.zoomTo(1),
@@ -2928,14 +2928,14 @@ c.resetScrollbars()):d.fitWindow(a)},null,null,Editor.ctrlKey+"+Shift+H");this.a
2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,e=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/e,(d.container.clientHeight-10)/a.height/e))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-
d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,
function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);
-!isNaN(a)&&0<a&&(a=new ChangePageSetup(c,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var n=null,n=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());c.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",
-function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;c.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(c);
-a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){c.setScrollbars(!c.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){c.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});
-n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;c.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());c.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});
-n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());c.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return c.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(c.showDialog((new AboutDialog(c)).container,320,280,!0,!0,function(){q=!1}),q=!0)}));n=mxUtils.bind(this,function(a,e,c,f){return this.addAction(a,function(){if(null!=c&&d.cellEditor.isContentEditing())c();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();
+!isNaN(a)&&0<a&&(a=new ChangePageSetup(c,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());c.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.isGridEnabled()});m.setEnabled(!1);m=this.addAction("guides",
+function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;c.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});m.setEnabled(!1);m=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(c);
+a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.foldingEnabled});m.isEnabled=k;m=this.addAction("scrollbars",function(){c.setScrollbars(!c.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){c.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});
+m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;c.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());c.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});
+m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());c.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=k;m=this.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.editor.autosave});m.isEnabled=k;m.visible=!1;this.addAction("help",function(){var a=
+"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(c.showDialog((new AboutDialog(c)).container,320,280,!0,!0,function(){q=!1}),q=!0)}));m=mxUtils.bind(this,function(a,e,c,f){return this.addAction(a,function(){if(null!=c&&d.cellEditor.isContentEditing())c();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();
d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,e,a);(e&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(e&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):(e&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=
-null;"U"==a.nodeName&&d.replaceElement(a)});for(var b=0;b<a.length;b++)0==d.model.getChildCount(a[b])&&d.autoSizeCell(a[b],!1)}finally{d.getModel().endUpdate()}}},null,null,f)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");
+null;"U"==a.nodeName&&d.replaceElement(a)});for(var b=0;b<a.length;b++)0==d.model.getChildCount(a[b])&&d.autoSizeCell(a[b],!1)}finally{d.getModel().endUpdate()}}},null,null,f)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");
this.addAction("fontColor...",function(){c.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){c.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){c.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){c.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){c.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});
this.addAction("borderColor...",function(){c.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){c.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){c.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",
@@ -2944,41 +2944,41 @@ function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASH
function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),e=d.getCurrentCellStyle(a[0]),f="1"==mxUtils.getValue(e,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,f);d.setCellStyles(mxConstants.STYLE_CURVED,null);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",
function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),e="1";null!=a&&null!=d.getFoldingImage(a)&&(e="0");d.setCellStyles("collapsible",e);c.fireEvent(new mxEventObject("styleChanged",
"keys",["collapsible"],"values",[e],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var e=d.getModel(),e=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",e.getStyle(a[0])||"",function(b){null!=b&&d.setCellStyle(mxUtils.trim(b),a)},null,null,400,220);this.editorUi.showDialog(e.container,420,300,!0,!0);e.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&
-!d.isSelectionEmpty()&&c.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&c.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var e=f.graph.selectionCellsHandler.getHandler(a);if(e instanceof mxEdgeHandler){for(var c=d.view.translate,p=d.view.scale,m=c.x,c=c.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);d.getModel().isVertex(a)&&
-null!=l;)m+=l.x,c+=l.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);m=Math.round(d.snap(d.popupMenuHandler.triggerX/p-m));p=Math.round(d.snap(d.popupMenuHandler.triggerY/p-c));e.addPointAt(e.state,m,p)}}});this.addAction("removeWaypoint",function(){var a=c.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var e=
-0;e<a.length;e++){var c=a[e];if(d.getModel().isEdge(c)){var f=d.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,d.getModel().setGeometry(c,f))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",
-!1,null)}),null,null,Editor.ctrlKey+"+.");n=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),f="";null!=e&&(f=e.style[mxConstants.STYLE_IMAGE]||f);var p=d.cellEditor.saveSelection();c.showImageDialog(a,
+!d.isSelectionEmpty()&&c.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&c.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var e=f.graph.selectionCellsHandler.getHandler(a);if(e instanceof mxEdgeHandler){for(var c=d.view.translate,p=d.view.scale,n=c.x,c=c.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);d.getModel().isVertex(a)&&
+null!=l;)n+=l.x,c+=l.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);n=Math.round(d.snap(d.popupMenuHandler.triggerX/p-n));p=Math.round(d.snap(d.popupMenuHandler.triggerY/p-c));e.addPointAt(e.state,n,p)}}});this.addAction("removeWaypoint",function(){var a=c.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var e=
+0;e<a.length;e++){var c=a[e];if(d.getModel().isEdge(c)){var f=d.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,d.getModel().setGeometry(c,f))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",
+!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),f="";null!=e&&(f=e.style[mxConstants.STYLE_IMAGE]||f);var p=d.cellEditor.saveSelection();c.showImageDialog(a,
f,function(a,b,e){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(p),d.insertImage(a,b,e);else{var c=d.getSelectionCells();if(null!=a&&(0<a.length||0<c.length)){var f=null;d.getModel().beginUpdate();try{if(0==c.length){var c=[d.insertVertex(d.getDefaultParent(),null,"",0,0,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],g=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(c,!0));c[0].geometry.x=g.x;c[0].geometry.y=g.y;f=c;d.fireEvent(new mxEventObject("cellsInserted",
-"cells",f))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,c);var l=d.getCurrentCellStyle(c[0]);"image"!=l[mxConstants.STYLE_SHAPE]&&"label"!=l[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",c):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,c);if(1==d.getSelectionCount()&&null!=b&&null!=e){var m=c[0],k=d.getModel().getGeometry(m);null!=k&&(k=k.clone(),k.width=b,k.height=e,d.getModel().setGeometry(m,k))}}finally{d.getModel().endUpdate()}null!=f&&(d.setSelectionCells(f),
-d.scrollCellToVisible(f[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(c,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),
-c.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,function(){c.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,
-function(){return 0<c.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(c,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,c,f,d,k){var n;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),n=mxResources.get(a)+"..."):n=mxResources.get(a);return this.put(a,new Action(n,c,f,d,k))};Actions.prototype.put=function(a,c){return this.actions[a]=c};Actions.prototype.get=function(a){return this.actions[a]};
+"cells",f))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,c);var l=d.getCurrentCellStyle(c[0]);"image"!=l[mxConstants.STYLE_SHAPE]&&"label"!=l[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",c):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,c);if(1==d.getSelectionCount()&&null!=b&&null!=e){var n=c[0],k=d.getModel().getGeometry(n);null!=k&&(k=k.clone(),k.width=b,k.height=e,d.getModel().setGeometry(n,k))}}finally{d.getModel().endUpdate()}null!=f&&(d.setSelectionCells(f),
+d.scrollCellToVisible(f[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(c,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),
+c.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",mxUtils.bind(this,function(){c.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,
+function(){return 0<c.formatWidth}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(c,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
+null,null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,c,f,d,k){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,c,f,d,k))};Actions.prototype.put=function(a,c){return this.actions[a]=c};Actions.prototype.get=function(a){return this.actions[a]};
function Action(a,c,f,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(c);this.enabled=null!=f?f:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=c||"";this.shadowPages=null;this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;
DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
-DrawioFile.prototype.updateFile=function(a,c,f,d){null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=k?this.mergeFile(k,a,c,d):this.reloadFile(a,c))}catch(n){null!=c&&c(n)}}),c))};
-DrawioFile.prototype.mergeFile=function(a,c,f,d){var k=!0;try{this.stats.fileMerged++;var n=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;var b=[this.ui.diffPages(null!=d?d:n,this.shadowPages)];if(!this.ignorePatches(b)){var e=this.ui.patchPages(n,
-b[0]);d={};var g=this.ui.getHashValueForPages(e,d),n={},p=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",b,"checksum",p==g,g);if(null!=g&&g!=p){var m=this.compressReportData(this.getAnonymizedXmlForPages(q)),l=this.compressReportData(this.getAnonymizedXmlForPages(e)),v=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,b,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+v+"\nTo: "+t+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+l,null,"mergeFile");return}this.patch(b,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=f&&f(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,D)}}catch(A){}}};
+DrawioFile.prototype.updateFile=function(a,c,f,d){null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=k?this.mergeFile(k,a,c,d):this.reloadFile(a,c))}catch(m){null!=c&&c(m)}}),c))};
+DrawioFile.prototype.mergeFile=function(a,c,f,d){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var b=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(b)){var e=this.ui.patchPages(m,
+b[0]);d={};var g=this.ui.getHashValueForPages(e,d),m={},p=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",b,"checksum",p==g,g);if(null!=g&&g!=p){var n=this.compressReportData(this.getAnonymizedXmlForPages(q)),l=this.compressReportData(this.getAnonymizedXmlForPages(e)),x=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,b,"Shadow Details: "+JSON.stringify(d)+
+"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+x+"\nTo: "+t+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+l,null,"mergeFile");return}this.patch(b,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=f&&f(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var y=this.getCurrentUser(),v=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),v,D)}}catch(z){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),f=c.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=c.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);f.appendChild(k)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(a,c,f){c=null!=c?c:1E4;null!=f&&null!=a&&a.length>f?a=a.substring(0,f)+"[...]":null!=a&&a.length>c&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,c,f,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var n=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+b+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?n(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?n(a):n(null)}),function(){})}else{var q=this.getCurrentUser(),b=null!=q?q.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+b+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+DrawioFile.prototype.checksumError=function(a,c,f,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var m=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+b+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var q=this.getCurrentUser(),b=null!=q?q.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+b+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+b+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(e){}}}catch(e){}};
-DrawioFile.prototype.sendErrorReport=function(a,c,f,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),q=this.getCurrentUser(),b=null!=q?this.ui.hashValue(q.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),p=g.lastIndexOf("."),q="xml";0<p&&(q=g.substring(p));var m=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(a,c,f,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),q=this.getCurrentUser(),b=null!=q?this.ui.hashValue(q.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),p=g.lastIndexOf("."),q="xml";0<p&&(q=g.substring(p));var n=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+q+")\nUser="+b+e+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:
-"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+k+"\n\nData:\n"+n,d)}catch(l){}};
-DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),f=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,c,f);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);null!=a&&
+"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+n+"\n\nShadow:\n"+k+"\n\nData:\n"+m,d)}catch(l){}};
+DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),f=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,c,f);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);null!=a&&
a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()}catch(d){null!=c&&c(d)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,f=0;f<a.length&&c;f++)c=c&&0==Object.keys(a[f]).length;return c};
-DrawioFile.prototype.patch=function(a,c){var f=this.ui.editor.undoManager,d=f.history.slice(),k=f.indexOfNextAdd,n=this.ui.editor.graph;n.container.style.visibility="hidden";var q=this.changeListenerEnabled;this.changeListenerEnabled=!1;var b=n.foldingEnabled,e=n.mathEnabled,g=n.cellRenderer.redraw;n.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());g.apply(this,arguments)};n.model.beginUpdate();try{for(var p=
-0;p<a.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[p],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{n.container.style.visibility="";n.model.endUpdate();n.cellRenderer.redraw=g;this.changeListenerEnabled=q;f.history=d;f.indexOfNextAdd=k;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)e!=
-n.mathEnabled?(this.ui.editor.updateGraphComponents(),n.refresh()):(b!=n.foldingEnabled?n.view.revalidate():n.view.validate(),n.sizeDidChange());this.ui.updateTabContainer()}};
-DrawioFile.prototype.save=function(a,c,f,d,k,n){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=f)f({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(q){if(null!=f)f(q);else throw q;}};
+DrawioFile.prototype.patch=function(a,c){var f=this.ui.editor.undoManager,d=f.history.slice(),k=f.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var q=this.changeListenerEnabled;this.changeListenerEnabled=!1;var b=m.foldingEnabled,e=m.mathEnabled,g=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());g.apply(this,arguments)};m.model.beginUpdate();try{for(var p=
+0;p<a.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[p],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=g;this.changeListenerEnabled=q;f.history=d;f.indexOfNextAdd=k;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)e!=
+m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(b!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}};
+DrawioFile.prototype.save=function(a,c,f,d,k,m){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=f)f({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(q){if(null!=f)f(q);else throw q;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,c,f){};DrawioFile.prototype.saveFile=function(a,c,f,d){};
DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(a){this.shadowModified=a};DrawioFile.prototype.setModified=function(a){this.shadowModified=this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,c,f){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,c,f){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -2995,9 +2995,9 @@ DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer
DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=Editor.guid());var a={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(a));EditorUi.debug("draft saved",this.draftId,a)}catch(c){console.error(c),this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(this.ui.removeDatabaseItem(".draft_"+this.draftId),EditorUi.debug("draft deleted",".draft_"+this.draftId))}catch(a){}};
DrawioFile.prototype.addUnsavedStatus=function(a){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(a instanceof Error&&null!=a.message&&""!=a.message){var c=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+" ("+mxUtils.htmlEntities(a.message)+")</div>")}else{c=this.getErrorMessage(a);if(null==c&&null!=this.lastSaved){var f=this.ui.timeSince(new Date(this.lastSaved));
-null!=f&&(c=mxResources.get("lastSaved",[f]))}null!=c&&60<c.length&&(c=c.substring(0,60)+"...");c=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=c&&""!=c?" ("+mxUtils.htmlEntities(c)+")":"");this.ui.editor.setStatus('<div title="'+c+'" class="geStatusAlertOrange" style="cursor:pointer;overflow:hidden;">'+c+' <img src="'+Editor.saveImage+'" align="top" style="width:16px;margin-top:-2px"/></div>');c=this.ui.statusContainer.getElementsByTagName("div");null!=c&&0<c.length?
-mxEvent.addListener(c[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):(c=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+" ("+mxUtils.htmlEntities(a.message)+")</div>"));EditorUi.enableDrafts&&null==this.getMode()&&(null!=this.saveDraftThread&&window.clearTimeout(this.saveDraftThread),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,
-function(){this.saveDraft()}),0))}};
+null!=f&&(c=mxResources.get("lastSaved",[f]))}null!=c&&60<c.length&&(c=c.substring(0,60)+"...");c=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=c&&""!=c?" ("+mxUtils.htmlEntities(c)+")":"");this.ui.editor.setStatus('<div title="'+c+'" class="geStatusAlertOrange" style="cursor:pointer;overflow:hidden;">'+c+' <img src="'+Editor.saveImage+'" align="top" style="width:16px;margin-top:'+(mxClient.IS_FF?-3:-2)+'px"/></div>');c=this.ui.statusContainer.getElementsByTagName("div");
+null!=c&&0<c.length?mxEvent.addListener(c[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):(c=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+" ("+mxUtils.htmlEntities(a.message)+")</div>"));EditorUi.enableDrafts&&null==this.getMode()&&(null!=this.saveDraftThread&&window.clearTimeout(this.saveDraftThread),this.saveDraftThread=
+window.setTimeout(mxUtils.bind(this,function(){this.saveDraft()}),0))}};
DrawioFile.prototype.addConflictStatus=function(a,c){this.invalidChecksum&&null==c&&(c=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=c&&""!=c?" ("+mxUtils.htmlEntities(c)+")":""));this.ui.spinner.stop();this.clearAutosave();var f=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=f&&0<f.length?mxEvent.addListener(f[0],"click",mxUtils.bind(this,function(c){"IMG"!=mxEvent.getSource(c).nodeName&&
a()})):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),a)};DrawioFile.prototype.setConflictStatus=function(a){this.ui.editor.setStatus('<div title="'+a+'" class="geStatusAlert geBlink" style="cursor:pointer;overflow:hidden;">'+a+' <a href="https://desk.draw.io/support/solutions/articles/16000087947" target="_blank"><img border="0" style="margin-left:2px;cursor:help;opacity:0.5;width:16px;height:16px;" valign="bottom" src="'+Editor.helpImage+'" style=""/></a></div>')};
DrawioFile.prototype.showRefreshDialog=function(a,c,f){null==f&&(f=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(a,c)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(a,c)}),f),this.ui.showError(mxResources.get("error")+" ("+f+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,
@@ -3009,24 +3009,24 @@ window.location.href=f});null==a&&this.isModified()?this.ui.confirm(mxResources.
k)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,c);else if(this.isModified()&&this.addUnsavedStatus(a),c)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var f=this.getErrorMessage(a);null!=f&&60<f.length&&(f=f.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=f?" ("+mxUtils.htmlEntities(f)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,c){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,f,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),n=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,f,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,d,k):this.invalidChecksum?this.showRefreshDialog(f,d,this.getErrorMessage(a)):c?this.showConflictDialog(k,n):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+DrawioFile.prototype.handleConflictError=function(a,c){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,f,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,f,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,d,k):this.invalidChecksum?this.showRefreshDialog(f,d,this.getErrorMessage(a)):c?this.showConflictDialog(k,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
this.synchronizeFile(f,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var c=null!=a?null!=a.error?a.error.message:a.message:null;null==c&&null!=a&&a.code==App.ERROR_TIMEOUT&&(c=mxResources.get("timeout"));return c};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=
this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.createSecret=function(a){var c=Editor.guid(32);null!=this.sync?this.sync.createToken(c,mxUtils.bind(this,function(f){a(c,f)}),mxUtils.bind(this,function(){a(c)})):a(c)};
-DrawioFile.prototype.fileSaved=function(a,c,f,d,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=f&&f()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,f,d,k)}catch(b){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(b);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,b);else{var n=
-this.getCurrentUser(),q=null!=n?n.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),q,b)}}catch(e){}}};
+DrawioFile.prototype.fileSaved=function(a,c,f,d,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=f&&f()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,f,d,k)}catch(b){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(b);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,b);else{var m=
+this.getCurrentUser(),q=null!=m?m.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),q,b)}}catch(e){}}};
DrawioFile.prototype.autosave=function(a,c,f,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<c?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=f&&f(a)}),mxUtils.bind(this,
function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,c){if(null!=a&&null!=c){var f=a.lastIndexOf("."),d=0<f?a.substring(f):"",f=c.lastIndexOf(".");return d===(0<f?c.substring(f):"")}return a==c};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,c){a([])};DrawioFile.prototype.addComment=function(a,c,f){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,c){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,c)};LocalFile=function(a,c,f,d,k,n){DrawioFile.call(this,a,c);this.title=f;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=n};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,c){a([])};DrawioFile.prototype.addComment=function(a,c,f){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,c){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,c)};LocalFile=function(a,c,f,d,k,m){DrawioFile.call(this,a,c);this.title=f;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=m};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return null==this.fileHandle};LocalFile.prototype.save=function(a,c,f){this.saveAs(this.title,c,f)};LocalFile.prototype.saveAs=function(a,c,f){this.saveFile(a,!1,c,f)};LocalFile.prototype.saveAs=function(a,c,f){this.saveFile(a,!1,c,f)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(a){this.desc=a};
LocalFile.prototype.getLatestVersion=function(a,c){null==this.fileHandle?a(null):this.ui.loadFileSystemEntry(this.fileHandle,a,c)};
-LocalFile.prototype.saveFile=function(a,c,f,d,k){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;k||this.updateFileData();var n=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);c=this.getData();var q=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),b=mxUtils.bind(this,function(b){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
-function(a){this.savingFile=!1;null!=d&&d({error:a})});this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(c){this.desc.lastModified==c.lastModified?a.write(n?this.ui.base64ToBlob(b,"image/png"):b).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){this.savingFile=!1;this.desc=a;q()}),e)}),e)}),e):(this.inConflictState=!0,e())}),e)}),e)}}else{if(this.ui.isOfflineApp()||
-this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,n?"image/png":"text/xml",n);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+(n?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));q()}});n?(k=this.ui.getPngFileProperties(this.ui.fileNode),
+LocalFile.prototype.saveFile=function(a,c,f,d,k){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;k||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);c=this.getData();var q=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),b=mxUtils.bind(this,function(b){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
+function(a){this.savingFile=!1;null!=d&&d({error:a})});this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(c){this.desc.lastModified==c.lastModified?a.write(m?this.ui.base64ToBlob(b,"image/png"):b).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){this.savingFile=!1;this.desc=a;q()}),e)}),e)}),e):(this.inConflictState=!0,e())}),e)}),e)}}else{if(this.ui.isOfflineApp()||
+this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,m?"image/png":"text/xml",m);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+(m?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));q()}});m?(k=this.ui.getPngFileProperties(this.ui.fileNode),
this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){b(a)}),d,this.ui.getCurrentFile()!=this?c:null,k.scale,k.border)):b(c)};LocalFile.prototype.rename=function(a,c,f){this.title=a;this.descriptorChanged();null!=c&&c()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio"},{description:"diagramPngDesc",extension:"png"},{description:"diagramSvgDesc",extension:"svg"},{description:"diagramHtmlDesc",extension:"html"},{description:"diagramXmlDesc",extension:"xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",
extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",
fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",
@@ -3045,29 +3045,30 @@ Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3d
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=":
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
-Editor.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"/>');Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,
-isVisible:function(a,b){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
-isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",
-defVal:0,min:0,max:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",
-dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",
-type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",
-type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},
-{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},
-{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",
-dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(a,
-b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(e,"resizeLastRow","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(e,
-"resizeLast","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",dispName:"Fill"},{val:"width",
-dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(a,b){return b.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",
-type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",
-dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,b){var e=
-1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isSwimlane(e)||0<c.model.getChildCount(e))},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isContainer(e)&&"0"!=a.style.collapsible||!c.isContainer(e)&&"1"==a.style.collapsible)},
-isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length&&!b.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,b){var e=b.editorUi.editor.graph.model;return 0<a.vertices.length?
-e.isVertex(e.getParent(a.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,b){var e=0<a.vertices.length?b.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=e&&!e.relative}},
-{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",
-defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,b){var e=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return b.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==e||e==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,b){return 0<a.vertices.length&&b.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.createRoughCanvas=function(a){var b=rough.canvas({getContext:function(){return a}});b.draw=function(b){var e=b.sets||[];b=b.options||this.getDefaultOptions();for(var c=0;c<e.length;c++){var d=e[c];switch(d.type){case "path":null!=b.stroke&&this._drawToContext(a,d,b);break;case "fillPath":this._drawToContext(a,d,b);break;case "fillSketch":this.fillSketch(a,d,b)}}};b.fillSketch=function(b,e,c){var d=a.state.strokeColor,f=a.state.strokeWidth,g=a.state.strokeAlpha,l=a.state.dashed,m=c.fillWeight;
-0>m&&(m=c.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(c.fill||"");a.setStrokeWidth(m);a.setDashed(!1);this._drawToContext(b,e,c);a.setDashed(l);a.setStrokeWidth(f);a.setStrokeColor(d);a.setStrokeAlpha(g)};b._drawToContext=function(a,b,e){a.begin();for(var c=0;c<b.ops.length;c++){var d=b.ops[c],f=d.data;switch(d.op){case "move":a.moveTo(f[0],f[1]);break;case "bcurveTo":a.curveTo(f[0],f[1],f[2],f[3],f[4],f[5]);break;case "lineTo":a.lineTo(f[0],f[1])}}a.end();"fillPath"===b.type&&
+Editor.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"/>');Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",
+type:"bool",defVal:!1,isVisible:function(a,b){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",
+type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",
+type:"float",defVal:0,min:0,max:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":
+"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",
+dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",
+dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",
+dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",
+type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},
+{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",
+type:"bool",getDefaultValue:function(a,b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(e,"resizeLastRow","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:
+null);return"1"==mxUtils.getValue(e,"resizeLast","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",
+dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(a,b){return b.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",
+type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isSwimlane(e)||0<c.model.getChildCount(e))},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isContainer(e)&&"0"!=a.style.collapsible||
+!c.isContainer(e)&&"1"==a.style.collapsible)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length&&!b.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,b){var e=
+b.editorUi.editor.graph.model;return 0<a.vertices.length?e.isVertex(e.getParent(a.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,b){var e=0<a.vertices.length?b.editorUi.editor.graph.getCellGeometry(a.vertices[0]):
+null;return null!=e&&!e.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",
+dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,b){var e=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return b.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==e||e==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,b){return 0<a.vertices.length&&b.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);
+Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
+Editor.createRoughCanvas=function(a){var b=rough.canvas({getContext:function(){return a}});b.draw=function(b){var e=b.sets||[];b=b.options||this.getDefaultOptions();for(var c=0;c<e.length;c++){var d=e[c];switch(d.type){case "path":null!=b.stroke&&this._drawToContext(a,d,b);break;case "fillPath":this._drawToContext(a,d,b);break;case "fillSketch":this.fillSketch(a,d,b)}}};b.fillSketch=function(b,e,c){var d=a.state.strokeColor,f=a.state.strokeWidth,g=a.state.strokeAlpha,l=a.state.dashed,n=c.fillWeight;
+0>n&&(n=c.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(c.fill||"");a.setStrokeWidth(n);a.setDashed(!1);this._drawToContext(b,e,c);a.setDashed(l);a.setStrokeWidth(f);a.setStrokeColor(d);a.setStrokeAlpha(g)};b._drawToContext=function(a,b,e){a.begin();for(var c=0;c<b.ops.length;c++){var d=b.ops[c],f=d.data;switch(d.op){case "move":a.moveTo(f[0],f[1]);break;case "bcurveTo":a.curveTo(f[0],f[1],f[2],f[3],f[4],f[5]);break;case "lineTo":a.lineTo(f[0],f[1])}}a.end();"fillPath"===b.type&&
e.filled?a.fill():a.stroke()};return b};(function(){function a(b,e,c){this.canvas=b;this.rc=e;this.shape=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,a.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,a.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,a.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,a.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,a.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,a.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,a.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,a.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
a.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,a.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,a.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,a.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,a.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,a.prototype.fillAndStroke);
@@ -3077,7 +3078,7 @@ d=null;(e.filled=b)?(e.fill="none"===this.canvas.state.fillColor?"":this.canvas.
f);f=mxUtils.getValue(this.shape.style,"fillWeight",-1);e.fillWeight="auto"==f?-1:f;f=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==f&&(f=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",f=null!=e.fill&&(null!=d||null!=f&&e.fill.toLowerCase()==f.toLowerCase())?"solid":c.fillStyle);e.fillStyle=f;return e};a.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};a.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};a.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=2;a<arguments.length;a+=2)this.lastX=arguments[a-1],this.lastY=arguments[a],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};a.prototype.lineTo=function(a,b){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,a,b),this.lastX=a,this.lastY=b)};a.prototype.moveTo=
function(a,b){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,a,b),this.lastX=a,this.lastY=b,this.firstX=a,this.firstY=b)};a.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};a.prototype.quadTo=function(a,b,e,c){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,a,b,e,c),this.lastX=e,this.lastY=c)};a.prototype.curveTo=function(a,b,e,c,d,f){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,b,e,c,d,f),this.lastX=d,this.lastY=f)};a.prototype.arcTo=function(a,b,e,c,d,f,g){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var l=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,e,c,d,f,g);if(null!=l)for(var m=0;m<l.length;m+=6)this.curveTo(l[m],l[m+1],l[m+2],l[m+3],l[m+4],l[m+5]);this.lastX=f;this.lastY=g}};a.prototype.rect=function(a,b,e,c){this.passThrough?this.originalRect.apply(this.canvas,
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,b,e,c,d,f),this.lastX=d,this.lastY=f)};a.prototype.arcTo=function(a,b,e,c,d,f,g){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var l=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,e,c,d,f,g);if(null!=l)for(var n=0;n<l.length;n+=6)this.curveTo(l[n],l[n+1],l[n+2],l[n+3],l[n+4],l[n+5]);this.lastX=f;this.lastY=g}};a.prototype.rect=function(a,b,e,c){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(a,b,e,c,this.getStyle(!0,!0)))};a.prototype.ellipse=function(a,b,e,c){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(a+e/2,b+c/2,e,c,this.getStyle(!0,!0)))};a.prototype.roundrect=function(a,b,e,c,d,f){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(a+d,b),this.lineTo(a+e-d,b),this.quadTo(a+e,b,a+e,b+f),this.lineTo(a+
e,b+c-f),this.quadTo(a+e,b+c,a+e-d,b+c),this.lineTo(a+d,b+c),this.quadTo(a,b+c,a,b+c-f),this.lineTo(a,b+f),this.quadTo(a,b,a+d,b))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(H){}this.passThrough=!1}else if(null!=this.nextShape){for(var b in a)this.nextShape.options[b]=a[b];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};a.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};a.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};a.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};a.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
@@ -3088,7 +3089,7 @@ c||(b.save(),c=this.fill,d=this.stroke,this.stroke=this.fill=null,b.handJiggle.p
a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=c&&0<c.length)for(var f=0;f<c.length;f++)if("mxgraph"==c[f].getAttribute("class")){d.push(c[f]);break}0<d.length&&(c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(a=mxUtils.parseXml(d.xml),a=a.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(c=mxUtils.getTextContent(d[0]),c=Graph.decompress(c,null,e),0<c.length&&(a=mxUtils.parseXml(c),a=a.documentElement))))}if(null!=
a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=
d&&(a=Editor.parseDiagramNode(d,e)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,b){var e=mxUtils.trim(mxUtils.getTextContent(a)),c=null;0<e.length?(e=Graph.decompress(e,null,b),null!=e&&0<e.length&&(c=mxUtils.parseXml(e).documentElement)):(e=mxUtils.getChildNodes(a),0<e.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(e[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml=function(a){var b=mxUtils.getTextContent(a),
-e=null;0<b.length?e=Graph.decompress(b):null!=a.firstChild&&(e=mxUtils.getXml(a.firstChild));return e};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var b=null,e="",c=0,d=0,f=[],g=null;d<a.length;){var l=a.charCodeAt(d),d=d+1;10!=l&&(e+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var m=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(m>d){b=a.substring(d,m);break}}10==l&&("endobj"==
+e=null;0<b.length?e=Graph.decompress(b):null!=a.firstChild&&(e=mxUtils.getXml(a.firstChild));return e};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var b=null,e="",c=0,d=0,f=[],g=null;d<a.length;){var l=a.charCodeAt(d),d=d+1;10!=l&&(e+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var n=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(n>d){b=a.substring(d,n);break}}10==l&&("endobj"==
e?g=null:"obj"==e.substring(e.length-3,e.length)||"xref"==e||"trailer"==e?(g=[],f[e.split(" ")[0]]=g):null!=g&&g.push(e),e="")}null==b&&(b=Editor.extractGraphModelFromXref(f));null!=b&&(b=decodeURIComponent(b.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return b};Editor.extractGraphModelFromXref=function(a){var b=a.trailer,e=null;null!=b&&(b=/.* \/Info (\d+) (\d+) R/g.exec(b.join("\n")),null!=b&&0<b.length&&(b=a[b[1]],null!=b&&(b=/.* \/Subject (\d+) (\d+) R/g.exec(b.join("\n")),null!=b&&0<b.length&&
(a=a[b[1]],null!=a&&(a=a.join("\n"),e=a.substring(1,a.length-1))))));return e};Editor.extractGraphModelFromPng=function(a){var b=null;try{var e=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,e,d){a=c.substring(a+8,a+8+d);"zTXt"==e?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==e&&
(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(b=a[1]));if(null!=b||"IDAT"==e)return!0}))}catch(O){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.extractParserError=function(a,b){var e=null,c=null!=a?a.getElementsByTagName("parsererror"):null;null!=c&&0<c.length&&(e=b||mxResources.get("invalidChars"),c=c[0].getElementsByTagName("div"),0<c.length&&(e=mxUtils.getTextContent(c[0])));
@@ -3115,28 +3116,28 @@ var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\
return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,e=this;a.convert=function(c){if(null!=c){var d="http://"==c.substring(0,7)||"https://"==c.substring(0,8);d&&!navigator.onLine?c=Editor.svgBrokenImage.src:!d||c.substring(0,a.baseUrl.length)==a.baseUrl||e.crossOriginImages&&e.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,
19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,b){try{var e=!0,c=window.setTimeout(mxUtils.bind(this,function(){e=!1;b(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);e&&b(Editor.createSvgDataUri(a.getText()))}),
function(){window.clearTimeout(c);e&&b(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(c);if(e)try{var a=document.createElement("canvas"),f=a.getContext("2d");a.height=d.height;a.width=d.width;f.drawImage(d,0,0);b(a.toDataURL())}catch(fa){b(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(c);e&&b(Editor.svgBrokenImage.src)};d.src=a}}catch(H){b(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(a,b,e,c){null==c&&(c=this.createImageUrlConverter());var d=0,f=e||{};e=mxUtils.bind(this,function(e,g){for(var l=a.getElementsByTagName(e),m=0;m<l.length;m++)mxUtils.bind(this,function(e){try{if(null!=e){var l=c.convert(e.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var m=f[l];null==m?(d++,this.convertImageToDataUri(l,function(c){null!=c&&(f[l]=c,e.setAttribute(g,c));d--;0==d&&b(a)})):e.setAttribute(g,m)}else null!=l&&e.setAttribute(g,l)}}catch(ha){}})(l[m])});e("image","xlink:href");
+function(a,b,e,c){null==c&&(c=this.createImageUrlConverter());var d=0,f=e||{};e=mxUtils.bind(this,function(e,g){for(var l=a.getElementsByTagName(e),n=0;n<l.length;n++)mxUtils.bind(this,function(e){try{if(null!=e){var l=c.convert(e.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var n=f[l];null==n?(d++,this.convertImageToDataUri(l,function(c){null!=c&&(f[l]=c,e.setAttribute(g,c));d--;0==d&&b(a)})):e.setAttribute(g,n)}else null!=l&&e.setAttribute(g,l)}}catch(ha){}})(l[n])});e("image","xlink:href");
e("img","src");0==d&&b(a)};Editor.base64Encode=function(a){for(var b="",e=0,c=a.length,d,f,g;e<c;){d=a.charCodeAt(e++)&255;if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}f=a.charCodeAt(e++);if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&
3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(e++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};
-Editor.prototype.loadUrl=function(a,b,e,c,d,f,g,l){try{var m=!g&&(c||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var p=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var c=a.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
-for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);c=c.join("")}f=null!=f?f:"data:image/png;base64,";c=f+Editor.base64Encode(c)}b(c)}}else null!=e&&(0==a.getStatus()?e({message:mxResources.get("accessDenied")},a):e({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=e&&e({message:mxResources.get("error")+" "+a.getStatus()})},m,this.timeout,function(){d&&null!=e&&e({code:App.ERROR_TIMEOUT,retry:p})},l)});p()}catch(Y){null!=e&&e(Y)}};Editor.prototype.absoluteCssFonts=
+Editor.prototype.loadUrl=function(a,b,e,c,d,f,g,l){try{var n=!g&&(c||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var p=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var c=a.getText();if(n){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
+for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);c=c.join("")}f=null!=f?f:"data:image/png;base64,";c=f+Editor.base64Encode(c)}b(c)}}else null!=e&&(0==a.getStatus()?e({message:mxResources.get("accessDenied")},a):e({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=e&&e({message:mxResources.get("error")+" "+a.getStatus()})},n,this.timeout,function(){d&&null!=e&&e({code:App.ERROR_TIMEOUT,retry:p})},l)});p()}catch(Y){null!=e&&e(Y)}};Editor.prototype.absoluteCssFonts=
function(a){var b=null;if(null!=a){var e=a.split("url(");if(0<e.length){b=[e[0]];a=window.location.pathname;var c=null!=a?a.lastIndexOf("/"):-1;0<=c&&(a=a.substring(0,c+1));var c=document.getElementsByTagName("base"),d=null;null!=c&&0<c.length&&(d=c[0].getAttribute("href"));for(var f=1;f<e.length;f++)if(c=e[f].indexOf(")"),0<c){var g=Editor.trimCssUrl(e[f].substring(0,c));this.graph.isRelativeUrl(g)&&(g=null!=d?d+g:window.location.protocol+"//"+window.location.hostname+("/"==g.charAt(0)?"":a)+g);
b.push('url("'+g+'"'+e[f].substring(c))}else b.push(e[f])}else b=[a]}return null!=b?b.join(""):null};Editor.prototype.embedCssFonts=function(a,b){var e=a.split("url("),c=0;null==this.cachedFonts&&(this.cachedFonts={});var d=mxUtils.bind(this,function(){if(0==c){for(var a=[e[0]],d=1;d<e.length;d++){var f=e[d].indexOf(")");a.push('url("');a.push(this.cachedFonts[Editor.trimCssUrl(e[d].substring(0,f))]);a.push('"'+e[d].substring(f))}b(a.join(""))}});if(0<e.length){for(var f=1;f<e.length;f++){var g=e[f].indexOf(")"),
-l=null,m=e[f].indexOf("format(",g);0<m&&(l=Editor.trimCssUrl(e[f].substring(m+7,e[f].indexOf(")",m))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;c++;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";
+l=null,n=e[f].indexOf("format(",g);0<n&&(l=Editor.trimCssUrl(e[f].substring(n+7,e[f].indexOf(")",n))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;c++;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 e=a;/^https?:\/\//.test(e)&&!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(e,mxUtils.bind(this,function(b){this.cachedFonts[a]=b;c--;d()}),mxUtils.bind(this,function(a){c--;d()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(Editor.trimCssUrl(e[f].substring(0,g)),l)}d()}else b(a)};Editor.prototype.loadFonts=
function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(b){this.resolvedFontCss=b;a()})):a()};Editor.prototype.embedExtFonts=function(a){var b=this.graph.extFonts;if(null!=b&&0<b.length){var e="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(e,a)}),f=0;f<b.length;f++)mxUtils.bind(this,function(a,b){0==b.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[b]?
(c++,this.loadUrl(b,mxUtils.bind(this,function(a){this.cachedGoogleFonts[b]=a;e+=a;c--;d()}),mxUtils.bind(this,function(a){c--;e+="@import url("+b+");";d()}))):e+=this.cachedGoogleFonts[b]:e+='@font-face {font-family: "'+a+'";src: url("'+b+'");}'})(b[f].name,b[f].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),e=0;e<b.length;e++)0<mxUtils.getTextContent(b[e]).indexOf("MathJax")&&a[0].appendChild(b[e].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,b){b=null!=b?b:this.absoluteCssFonts(this.fontCss);if(null!=b){var e=a.getElementsByTagName("defs"),c=a.ownerDocument;0==e.length?(e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=e[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,b);e.appendChild(c)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,e,c,d,f,g,l,m,p,t,k,n,y,v,x){try{f=null!=f?f:!0;g=null!=g?g:!0;k=null!=k?k:this.graph;n=null!=n?n:0;var u=m?null:k.background;u==mxConstants.NONE&&(u=null);null==u&&(u=c);null==u&&0==m&&(u=x?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(k.getSvg(null,null,null,y,null,g,null,null,null,p,null,x),mxUtils.bind(this,function(e){try{var c=
-new Image;c.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(c,n/l,n/l);a(m)},0):(y.drawImage(c,n/l,n/l),a(m))},m=document.createElement("canvas"),p=parseInt(e.getAttribute("width")),t=parseInt(e.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*t),b/p)):b/p);p=Math.ceil(l*p)+2*n;t=Math.ceil(l*t)+2*n;m.setAttribute("width",p);m.setAttribute("height",t);var y=m.getContext("2d");null!=u&&(y.beginPath(),y.rect(0,
-0,p,t),y.fillStyle=u,y.fill());y.scale(l,l);if(v){var x=k.view,B=x.scale;x.scale=1;var z=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));x.scale=B;var z="data:image/svg+xml;base64,"+z,q=k.gridSize*x.gridSteps*l,A=k.getGraphBounds(),D=x.translate.x*B,K=x.translate.y*B,C=D+(A.x-D)/B,H=K+(A.y-K)/B,E=new Image;E.onload=function(){try{for(var a=-Math.round(q-mxUtils.mod((D-C)*l,q)),b=-Math.round(q-mxUtils.mod((K-H)*l,q));a<p;a+=q)for(var e=b;e<t;e+=q)y.drawImage(E,a/l,e/l);g()}catch(ma){null!=
-d&&d(ma)}};E.onerror=function(a){null!=d&&d(a)};E.src=z}else g()}catch(pa){null!=d&&d(pa)}});c.onerror=function(a){null!=d&&d(a)};p&&this.graph.addSvgShadow(e);this.graph.mathEnabled&&this.addMathCss(e);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(e,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(e))}catch(P){null!=d&&d(P)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(e,a),this.loadFonts(g)}catch(T){null!=
-d&&d(T)}}))}catch(P){null!=d&&d(P)}}),e,t)}catch(Q){null!=d&&d(Q)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var n=k,q=0;8>q;q++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[k]=n;Editor.updateCRC=function(a,b,e,c){for(var d=0;d<c;d++)a=Editor.crcTable[(a^b.charCodeAt(e+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var b=-1,e=0;e<a.length;e++)b=b>>>8^Editor.crcTable[(b^a.charCodeAt(e))&255];return(b^-1)>>>0};Editor.writeGraphModelToPng=function(a,b,e,c,d){function f(a,b){var e=m;m+=
-b;return a.substring(e,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 l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(f(a,4),"IHDR"!=f(a,4))null!=d&&d();else{f(a,17);d=a.substring(0,m);do{var p=g(a);if("IDAT"==f(a,4)){d=a.substring(0,
-m-8);"pHYs"==b&&"dpi"==e?(e=Math.round(c/.0254),e=l(e)+l(e)+String.fromCharCode(1)):e=e+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+c;c=4294967295;c=Editor.updateCRC(c,b,0,4);c=Editor.updateCRC(c,e,0,e.length);d+=l(e.length)+b+e+l(c^4294967295);d+=a.substring(m-8,a.length);break}d+=a.substring(m-8,m-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,e,c,d,f,g,l,n,p,t,k,m,y,x,v){try{f=null!=f?f:!0;g=null!=g?g:!0;k=null!=k?k:this.graph;m=null!=m?m:0;var u=n?null:k.background;u==mxConstants.NONE&&(u=null);null==u&&(u=c);null==u&&0==n&&(u=v?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(k.getSvg(null,null,m,y,null,g,null,null,null,p,null,v),mxUtils.bind(this,function(e){try{var c=new Image;
+c.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(c,0,0);a(n)},0):(y.drawImage(c,0,0),a(n))},n=document.createElement("canvas"),p=parseInt(e.getAttribute("width")),t=parseInt(e.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*t),b/p)):b/p);p=Math.ceil(l*p);t=Math.ceil(l*t);n.setAttribute("width",p);n.setAttribute("height",t);var y=n.getContext("2d");null!=u&&(y.beginPath(),y.rect(0,0,p,t),y.fillStyle=u,
+y.fill());y.scale(l,l);if(x){var v=k.view,B=v.scale;v.scale=1;var A=btoa(unescape(encodeURIComponent(v.createSvgGrid(v.gridColor))));v.scale=B;var A="data:image/svg+xml;base64,"+A,q=k.gridSize*v.gridSteps*l,z=k.getGraphBounds(),D=v.translate.x*B,K=v.translate.y*B,C=D+(z.x-D)/B-m,H=K+(z.y-K)/B-m,E=new Image;E.onload=function(){try{for(var a=-Math.round(q-mxUtils.mod((D-C)*l,q)),b=-Math.round(q-mxUtils.mod((K-H)*l,q));a<p;a+=q)for(var e=b;e<t;e+=q)y.drawImage(E,a/l,e/l);g()}catch(ma){null!=d&&d(ma)}};
+E.onerror=function(a){null!=d&&d(a)};E.src=A}else g()}catch(pa){null!=d&&d(pa)}});c.onerror=function(a){null!=d&&d(a)};p&&this.graph.addSvgShadow(e);this.graph.mathEnabled&&this.addMathCss(e);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(e,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(e))}catch(P){null!=d&&d(P)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(e,a),this.loadFonts(g)}catch(T){null!=d&&d(T)}}))}catch(P){null!=
+d&&d(P)}}),e,t)}catch(Q){null!=d&&d(Q)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var m=k,q=0;8>q;q++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[k]=m;Editor.updateCRC=function(a,b,e,c){for(var d=0;d<c;d++)a=Editor.crcTable[(a^b.charCodeAt(e+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var b=-1,e=0;e<a.length;e++)b=b>>>8^Editor.crcTable[(b^a.charCodeAt(e))&255];return(b^-1)>>>0};Editor.writeGraphModelToPng=function(a,b,e,c,d){function f(a,b){var e=n;n+=b;return a.substring(e,n)}
+function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(f(a,4),"IHDR"!=f(a,4))null!=d&&d();else{f(a,17);d=a.substring(0,n);do{var p=g(a);if("IDAT"==f(a,4)){d=a.substring(0,n-8);"pHYs"==b&&"dpi"==
+e?(e=Math.round(c/.0254),e=l(e)+l(e)+String.fromCharCode(1)):e=e+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+c;c=4294967295;c=Editor.updateCRC(c,b,0,4);c=Editor.updateCRC(c,e,0,e.length);d+=l(e.length)+b+e+l(c^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
var b=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,e){b.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)?e=b.getId():null!=a.currentPage&&
(e=a.currentPage.getId());return e});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.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 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,e=b.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return e.shadowVisible},function(a){var c=new ChangePageSetup(b);c.ignoreColor=!0;c.ignoreImage=
+return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var n=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,e=b.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return e.shadowVisible},function(a){var c=new ChangePageSetup(b);c.ignoreColor=!0;c.ignoreImage=
!0;c.shadowVisible=a;e.model.execute(c)},{install:function(a){this.listener=function(){a(e.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var l=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=l.apply(this,arguments);var b=this.editorUi,
e=b.editor.graph;if(e.isEnabled()){var c=b.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a);b.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&
e.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return e.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(e.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var f=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
@@ -3163,35 +3164,35 @@ stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,e){if(null!=b){var c=function(a){if(null!=a)if(e)for(var c=
0;c<a.length;c++)b[a[c].name]=a[c];else for(var d in b){for(var f=!1,c=0;c<a.length;c++)if(a[c].name==d&&a[c].type==b[d].type){f=!0;break}f||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
-c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(H){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,c=a.edges,d=0;d<e.length;d++)this.findCommonProperties(e[d],b,0==d);for(d=0;d<c.length;d++)this.findCommonProperties(c[d],
+c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(H){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,c=a.edges,d=0;d<e.length;d++)this.findCommonProperties(e[d],b,0==d);for(d=0;d<c.length;d++)this.findCommonProperties(c[d],
b,0==e.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var t=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 t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
function(a,b,e){function c(a,b,e,c){k.getModel().beginUpdate();try{var d=[],f=[];if(null!=e.index){for(var g=[],l=e.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;e.index<g.length?null!=c?g.splice(c,1):g[e.index]=b:g.push(b);null!=e.size&&g.length>e.size&&(g=g.slice(0,e.size));b=g.join(",");null!=e.countProperty&&(k.setCellStyles(e.countProperty,g.length,k.getSelectionCells()),d.push(e.countProperty),f.push(g.length))}k.setCellStyles(a,
-b,k.getSelectionCells());d.push(a);f.push(b);if(null!=e.dependentProps)for(a=0;a<e.dependentProps.length;a++){var m=e.dependentPropsDefVal[a],p=e.dependentPropsVals[a];if(p.length>b)p=p.slice(0,b);else for(var n=p.length;n<b;n++)p.push(m);p=p.join(",");k.setCellStyles(e.dependentProps[a],p,k.getSelectionCells());d.push(e.dependentProps[a]);f.push(p)}if("function"==typeof e.onChange)e.onChange(k,b);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",f,"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}}
+b,k.getSelectionCells());d.push(a);f.push(b);if(null!=e.dependentProps)for(a=0;a<e.dependentProps.length;a++){var n=e.dependentPropsDefVal[a],p=e.dependentPropsVals[a];if(p.length>b)p=p.slice(0,b);else for(var m=p.length;m<b;m++)p.push(n);p=p.join(",");k.setCellStyles(e.dependentProps[a],p,k.getSelectionCells());d.push(e.dependentProps[a]);f.push(p)}if("function"==typeof e.onChange)e.onChange(k,b);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",f,"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}}
function d(b,e,c){var d=mxUtils.getOffset(a,!0),f=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=f.x-d.x+"px";e.style.top=f.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function f(a,b,e){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,
-function(f){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(f)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,b,e,d,f,g,l){null!=b&&(b=b.split(","),n.push({name:a,values:b,type:e,defVal:d,countProperty:f,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var m=g,t=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==
-a)m=m.nextSibling,t++;else break;var k={type:e,parentRow:g,index:t,isDeletable:!0,defVal:d,countProperty:f},t=p(a,"",k,0==t%2,l);c(a,d,k);m.parentNode.insertBefore(t,m.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,b,e,c,d,f,g){if(0<d){var l=Array(d);b=null!=b?b.split(","):[];for(var m=0;m<d;m++)l[m]=null!=b[m]?b[m]:null!=c?c:"";n.push({name:a,values:l,type:e,defVal:c,parentRow:f,flipBkg:g,size:d})}return document.createElement("div")}
-function m(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function p(b,e,p,k,n){var v=p.dispName,y=p.type,u=document.createElement("tr");u.className="gePropRow"+(n?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",b);u.setAttribute("data-pValue",e);k=!1;null!=p.index&&(u.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",k=!0);var x=document.createElement("td");
-x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));k&&(x.style.textAlign="right");u.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==y)x.appendChild(f(b,e,p));else if("bool"==y||"boolean"==y)x.appendChild(m(b,e,p));else if("enum"==y){var B=p.enumList;for(n=0;n<B.length;n++)if(v=B[n],v.val==e){x.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(t,function(){var f=
-document.createElement("select");d(x,f);for(var g=0;g<B.length;g++){var l=B[g],m=document.createElement("option");m.value=mxUtils.htmlEntities(l.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(m)}f.value=e;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);c(b,a,p)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==y?x.appendChild(g(b,e,p.subType,p.subDefVal,p.countProperty,
-u,n)):"staticArr"==y?x.appendChild(l(b,e,p.subType,p.subDefVal,p.size,u,n)):(x.innerHTML=e,mxEvent.addListener(x,"click",mxUtils.bind(t,function(){function f(){var a=g.value,a=0==a.length&&"string"!=y?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(b,a,p)}var g=document.createElement("input");d(x,g,!0);g.value=e;g.className=
-"gePropEditor";"int"!=y&&"float"!=y||p.allowAuto||(g.type="number",g.step="int"==y?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&f()});g.focus();mxEvent.addListener(g,"blur",function(){f()})})));p.isDeletable&&(n=mxUtils.button("-",mxUtils.bind(t,function(a){c(b,"",p,p.index);mxEvent.consume(a)})),n.style.height="16px",n.style.width="25px",n.style["float"]="right",n.className="geColorBtn",
-x.appendChild(n));u.appendChild(x);return u}var t=this,k=this.editorUi.editor.graph,n=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var x=document.createElement("img");x.src=Sidebar.prototype.expandedImage;u.appendChild(x);mxUtils.write(u,mxResources.get("property"));
-v.style.cursor="pointer";var B=function(){var b=y.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){x.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],f=d.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||a.removeChild(d)}catch(qa){}}else x.src=Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;
-B()});v.appendChild(u);u=document.createElement("th");u.className="gePropHeaderCell";u.innerHTML=mxResources.get("value");v.appendChild(u);y.appendChild(v);var z=!1,q=!1,A;for(A in b)if(v=b[A],"function"!=typeof v.isVisible||v.isVisible(e,this)){var D=null!=e.style[A]?mxUtils.htmlEntities(e.style[A]+""):null!=v.getDefaultValue?v.getDefaultValue(e,this):v.defVal;if("separator"==v.type)q=!q;else{if("staticArr"==v.type)v.size=parseInt(e.style[v.sizeProperty]||b[v.sizeProperty].defVal)||0;else if(null!=
-v.dependentProps){for(var C=v.dependentProps,E=[],K=[],u=0;u<C.length;u++){var G=e.style[C[u]];K.push(b[C[u]].subDefVal);E.push(null!=G?G.split(","):[])}v.dependentPropsDefVal=K;v.dependentPropsVals=E}y.appendChild(p(A,D,v,z,q));z=!z}}for(u=0;u<n.length;u++)for(v=n[u],b=v.parentRow,e=0;e<v.values.length;e++)A=p(v.name,v.values[e],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:e,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==e%2,v.flipBkg),b.parentNode.insertBefore(A,
-b.nextSibling),b=A;a.appendChild(y);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi,c=e.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
-var f="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(" "),g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.position="relative";g.style.textAlign="center";for(var l=[],m=0;m<this.defaultColorSchemes.length;m++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
-"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){t(a)}))})(m);l.push(p);g.appendChild(p)}var t=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(l[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;k(this.defaultColorSchemes[this.format.currentScheme]);l[this.format.currentScheme].style.background=
-"#84d7ff"}),k=mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{for(var d=c.getSelectionCells(),g=0;g<d.length;g++){for(var l=c.getModel().getStyle(d[g]),m=0;m<f.length;m++)l=mxUtils.removeStylename(l,f[m]);var p=c.getModel().isVertex(d[g])?e.initialDefaultVertexStyle:e.initialdefaultEdgeStyle;null!=a?(l=mxUtils.setStyle(l,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,
+function(f){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(f)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,b,e,d,f,g,l){null!=b&&(b=b.split(","),m.push({name:a,values:b,type:e,defVal:d,countProperty:f,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var n=g,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
+a)n=n.nextSibling,t++;else break;var k={type:e,parentRow:g,index:t,isDeletable:!0,defVal:d,countProperty:f},t=p(a,"",k,0==t%2,l);c(a,d,k);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,b,e,c,d,f,g){if(0<d){var l=Array(d);b=null!=b?b.split(","):[];for(var n=0;n<d;n++)l[n]=null!=b[n]?b[n]:null!=c?c:"";m.push({name:a,values:l,type:e,defVal:c,parentRow:f,flipBkg:g,size:d})}return document.createElement("div")}
+function n(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function p(b,e,p,k,m){var x=p.dispName,y=p.type,u=document.createElement("tr");u.className="gePropRow"+(m?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",b);u.setAttribute("data-pValue",e);k=!1;null!=p.index&&(u.setAttribute("data-index",p.index),x=(null!=x?x:"")+"["+p.index+"]",k=!0);var v=document.createElement("td");
+v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));k&&(v.style.textAlign="right");u.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==y)v.appendChild(f(b,e,p));else if("bool"==y||"boolean"==y)v.appendChild(n(b,e,p));else if("enum"==y){var B=p.enumList;for(m=0;m<B.length;m++)if(x=B[m],x.val==e){v.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(t,function(){var f=
+document.createElement("select");d(v,f);for(var g=0;g<B.length;g++){var l=B[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(n)}f.value=e;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);c(b,a,p)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==y?v.appendChild(g(b,e,p.subType,p.subDefVal,p.countProperty,
+u,m)):"staticArr"==y?v.appendChild(l(b,e,p.subType,p.subDefVal,p.size,u,m)):(v.innerHTML=e,mxEvent.addListener(v,"click",mxUtils.bind(t,function(){function f(){var a=g.value,a=0==a.length&&"string"!=y?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(b,a,p)}var g=document.createElement("input");d(v,g,!0);g.value=e;g.className=
+"gePropEditor";"int"!=y&&"float"!=y||p.allowAuto||(g.type="number",g.step="int"==y?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&f()});g.focus();mxEvent.addListener(g,"blur",function(){f()})})));p.isDeletable&&(m=mxUtils.button("-",mxUtils.bind(t,function(a){c(b,"",p,p.index);mxEvent.consume(a)})),m.style.height="16px",m.style.width="25px",m.style["float"]="right",m.className="geColorBtn",
+v.appendChild(m));u.appendChild(v);return u}var t=this,k=this.editorUi.editor.graph,m=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;u.appendChild(v);mxUtils.write(u,mxResources.get("property"));
+x.style.cursor="pointer";var B=function(){var b=y.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],f=d.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||a.removeChild(d)}catch(qa){}}else v.src=Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(x,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;
+B()});x.appendChild(u);u=document.createElement("th");u.className="gePropHeaderCell";u.innerHTML=mxResources.get("value");x.appendChild(u);y.appendChild(x);var A=!1,q=!1,z;for(z in b)if(x=b[z],"function"!=typeof x.isVisible||x.isVisible(e,this)){var D=null!=e.style[z]?mxUtils.htmlEntities(e.style[z]+""):null!=x.getDefaultValue?x.getDefaultValue(e,this):x.defVal;if("separator"==x.type)q=!q;else{if("staticArr"==x.type)x.size=parseInt(e.style[x.sizeProperty]||b[x.sizeProperty].defVal)||0;else if(null!=
+x.dependentProps){for(var C=x.dependentProps,E=[],K=[],u=0;u<C.length;u++){var G=e.style[C[u]];K.push(b[C[u]].subDefVal);E.push(null!=G?G.split(","):[])}x.dependentPropsDefVal=K;x.dependentPropsVals=E}y.appendChild(p(z,D,x,A,q));A=!A}}for(u=0;u<m.length;u++)for(x=m[u],b=x.parentRow,e=0;e<x.values.length;e++)z=p(x.name,x.values[e],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:e,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==e%2,x.flipBkg),b.parentNode.insertBefore(z,
+b.nextSibling),b=z;a.appendChild(y);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi,c=e.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
+var f="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(" "),g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.position="relative";g.style.textAlign="center";for(var l=[],n=0;n<this.defaultColorSchemes.length;n++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
+"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){t(a)}))})(n);l.push(p);g.appendChild(p)}var t=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(l[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;k(this.defaultColorSchemes[this.format.currentScheme]);l[this.format.currentScheme].style.background=
+"#84d7ff"}),k=mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{for(var d=c.getSelectionCells(),g=0;g<d.length;g++){for(var l=c.getModel().getStyle(d[g]),n=0;n<f.length;n++)l=mxUtils.removeStylename(l,f[n]);var p=c.getModel().isVertex(d[g])?e.initialDefaultVertexStyle:e.initialdefaultEdgeStyle;null!=a?(l=mxUtils.setStyle(l,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,
null)),mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||(l=""==a.fill?mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(b)||(l=""==a.stroke?mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),!mxEvent.isAltDown(b)&&c.getModel().isVertex(d[g])&&
(l=mxUtils.setStyle(l,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(l=mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),l=mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),l=mxUtils.setStyle(l,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(d[g])&&(l=mxUtils.setStyle(l,mxConstants.STYLE_FONTCOLOR,
mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(d[g],l)}}finally{c.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage=
"linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=""==a.fill?mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),b.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(e.initialDefaultVertexStyle,
mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var g=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),l=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=g;b.style.border="1px solid "+l}d.appendChild(b)});d.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,
-4)&&mxUtils.br(d),b(a[g])});null==this.format.currentScheme?t("dark"==uiTheme?1:0):t(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?28:8,n=document.createElement("div");n.style.cssText="position:absolute;left:10px;top:8px;bottom:"+m+"px;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(n,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+m+"px;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(n),a.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));b(n);b(v);k(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&&(e=mxUtils.button(mxResources.get("editStyle"),
+4)&&mxUtils.br(d),b(a[g])});null==this.format.currentScheme?t("dark"==uiTheme?1:0):t(this.format.currentScheme);var n=10>=this.defaultColorSchemes.length?28:8,m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:"+n+"px;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(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var x=document.createElement("div");x.style.cssText="position:absolute;left:202px;top:8px;bottom:"+n+"px;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(x));mxEvent.addListener(x,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));b(m);b(x);k(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&&(e=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),e.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),e.style.width="202px",e.style.marginBottom="2px",a.appendChild(e));var c=this.editorUi.editor.graph,d=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.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==e?b.style.width="202px":(e.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==e?b.style.width="202px":(e.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 y=Graph.prototype.init;
@@ -3199,12 +3200,12 @@ Graph.prototype.init=function(){function a(a){b=a;try{if(mxClient.IS_QUIRKS||7==
window.mxFreehand&&(this.freehand=new mxFreehand(this));var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var e=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):e.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);
if(null!=b){if("rack"==b.childLayout){var e=new mxStackLayout(this.graph,!1);e.gridSize=null!=b.rackUnitSize?parseFloat(b.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;e.fill=!0;e.marginLeft=b.marginLeft||0;e.marginRight=b.marginRight||0;e.marginTop=b.marginTop||0;e.marginBottom=b.marginBottom||0;e.allowGaps=b.allowGaps||0;e.resizeParent=!1;return e}if("undefined"!==typeof mxTableLayout&&"tableLayout"==b.childLayout)return e=new mxTableLayout(this.graph),e.rows=b.tableRows||
2,e.columns=b.tableColumns||2,e.colPercentages=b.colPercentages,e.rowPercentages=b.rowPercentages,e.equalColumns="1"==mxUtils.getValue(b,"equalColumns",e.colPercentages?"0":"1"),e.equalRows="1"==mxUtils.getValue(b,"equalRows",e.rowPercentages?"0":"1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.border=b.tableBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.autoAddCol="1"==mxUtils.getValue(b,
-"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return x.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
+"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return v.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=D.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);
-return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,m,p,t,k){var n=null;k||null==this.themes||"darkTheme"!=this.defaultThemeName||(n=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
-this.refresh());var v=A.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var y=v.ownerDocument,x=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?x.setAttributeNS("type","text/css"):x.setAttribute("type","text/css");for(var u="",B="",z=0;z<this.extFonts.length;z++){var q=this.extFonts[z].name,D=this.extFonts[z].url;0==D.indexOf(Editor.GOOGLE_FONTS)?u+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
-q+'";\nsrc: url("'+D+'");\n}\n'}x.appendChild(y.createTextNode(u+B));v.getElementsByTagName("defs")[0].appendChild(x)}null!=n&&(this.stylesheet=n,this.refresh());return v};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=C.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
-mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var z=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){z.apply(this,
+return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,n,p,t,k){var m=null;k||null==this.themes||"darkTheme"!=this.defaultThemeName||(m=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
+this.refresh());var x=z.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var y=x.ownerDocument,u=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?u.setAttributeNS("type","text/css"):u.setAttribute("type","text/css");for(var v="",B="",A=0;A<this.extFonts.length;A++){var q=this.extFonts[A].name,D=this.extFonts[A].url;0==D.indexOf(Editor.GOOGLE_FONTS)?v+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
+q+'";\nsrc: url("'+D+'");\n}\n'}u.appendChild(y.createTextNode(v+B));x.getElementsByTagName("defs")[0].appendChild(u)}null!=m&&(this.stylesheet=m,this.refresh());return x};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=C.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
+mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var E=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){E.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
null!=a.actions)){for(var b=0;b<a.actions.length;b++){var e=a.actions[b];if(null!=e.open)if(this.isCustomLink(e.open)){if(!this.customLinkClicked(e.open))return}else this.openLink(e.open)}this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)e=a.actions[b],null!=e.toggle&&this.toggleCells(this.getCellsForAction(e.toggle,!0)),null!=e.show&&this.setCellsVisible(this.getCellsForAction(e.show,!0),!0),null!=e.hide&&this.setCellsVisible(this.getCellsForAction(e.hide,!0),!1)}finally{this.model.endUpdate()}for(b=
@@ -3212,8 +3213,8 @@ null!=a.actions)){for(var b=0;b<a.actions.length;b++){var e=a.actions[b];if(null
this.getLinkForCell(b);null!=e&&"data:action/json,"==e.substring(0,17)&&this.setLinkForCell(b,this.updateCustomLink(a,e));if(this.isHtmlLabel(b)){var c=document.createElement("div");c.innerHTML=this.sanitizeHtml(this.getLabel(b));for(var d=c.getElementsByTagName("a"),f=!1,g=0;g<d.length;g++)e=d[g].getAttribute("href"),null!=e&&"data:action/json,"==e.substring(0,17)&&(d[g].setAttribute("href",this.updateCustomLink(a,e)),f=!0);f&&this.labelChanged(b,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,
b){if("data:action/json,"==b.substring(0,17))try{var e=JSON.parse(b.substring(17));null!=e.actions&&(this.updateCustomLinkActions(a,e.actions),b="data:action/json,"+JSON.stringify(e))}catch(L){}return b};Graph.prototype.updateCustomLinkActions=function(a,b){for(var e=0;e<b.length;e++){var c=b[e];this.updateCustomLinkAction(a,c.toggle);this.updateCustomLinkAction(a,c.show);this.updateCustomLinkAction(a,c.hide);this.updateCustomLinkAction(a,c.select);this.updateCustomLinkAction(a,c.highlight);this.updateCustomLinkAction(a,
c.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,b){if(null!=b&&null!=b.cells){for(var e=[],c=0;c<b.cells.length;c++)if("*"==b.cells[c])e.push(b.cells[c]);else{var d=a[b.cells[c]];null!=d?""!=d&&e.push(d):e.push(b.cells[c])}b.cells=e}};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,b))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var e=0;e<a.length;e++)if("*"==a[e])var c=this.getDefaultParent(),
-b=b.concat(this.model.filterDescendants(function(a){return a!=c},c));else{var d=this.model.getCell(a[e]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,e,c){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());e=null!=e?e:"tags";for(var f=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=!0,f++);for(l=0;l<b.length;l++)if(c&&this.model.getParent(b[l])==this.model.root||this.model.isVertex(b[l])||this.model.isEdge(b[l])){var m=null!=
-b[l].value&&"object"==typeof b[l].value?mxUtils.trim(b[l].value.getAttribute(e)||""):"",p=!1;if(0<m.length){if(m=m.toLowerCase().split(" "),m.length>=a.length){for(var t=p=0;t<m.length&&p<f;t++)null!=g[m[t]]&&p++;p=p==f}}else p=0==a.length;p&&d.push(b[l])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();
+b=b.concat(this.model.filterDescendants(function(a){return a!=c},c));else{var d=this.model.getCell(a[e]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,e,c){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());e=null!=e?e:"tags";for(var f=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=!0,f++);for(l=0;l<b.length;l++)if(c&&this.model.getParent(b[l])==this.model.root||this.model.isVertex(b[l])||this.model.isEdge(b[l])){var n=null!=
+b[l].value&&"object"==typeof b[l].value?mxUtils.trim(b[l].value.getAttribute(e)||""):"",p=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var t=p=0;t<n.length&&p<f;t++)null!=g[n[t]]&&p++;p=p==f}}else p=0==a.length;p&&d.push(b[l])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();
try{for(var e=0;e<a.length;e++)this.model.setVisible(a[e],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,e,c){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,e,c)};Graph.prototype.highlightCell=function(a,b,e,c){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;e=null!=e?e:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,b,d,!1);null!=c&&(f.opacity=c);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)},e)}};Graph.prototype.addSvgShadow=function(a,b,e){e=null!=e?e:!1;var c=a.ownerDocument,d=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");d.setAttribute("id",this.shadowId);var f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");
f.setAttribute("in","SourceAlpha");f.setAttribute("stdDeviation",this.svgShadowBlur);f.setAttribute("result","blur");d.appendChild(f);f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");f.setAttribute("in","blur");f.setAttribute("dx",this.svgShadowSize);f.setAttribute("dy",this.svgShadowSize);f.setAttribute("result","offsetBlur");d.appendChild(f);f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");
@@ -3231,40 +3232,40 @@ STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people
"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var 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 G=mxMarker.createMarker;mxMarker.createMarker=
-function(a,b,e,c,d,f,g,l,m,p){if(null!=e&&null==mxMarker.markers[e]){var t=this.getPackageForType(e);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){v.value=Math.max(1,Math.min(l,Math.max(parseInt(v.value),parseInt(n.value))));n.value=Math.max(1,Math.min(l,Math.min(parseInt(v.value),parseInt(n.value))))}function c(b){function e(b,e,f){var g=b.useCssTransforms,l=b.currentTranslate,m=b.currentScale,p=b.view.translate,t=
-b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var k=b.getGraphBounds(),n=0,y=0,v=ia.get(),x=1/b.pageScale,q=z.checked;if(q)var x=parseInt(K.value),A=parseInt(R.value),x=Math.min(v.height*A/(k.height/b.view.scale),v.width*x/(k.width/b.view.scale));else x=parseInt(u.value)/(100*b.pageScale),isNaN(x)&&(c=1/b.pageScale,u.value="100 %");v=mxRectangle.fromRectangle(v);v.width=Math.ceil(v.width*
-c);v.height=Math.ceil(v.height*c);x*=c;!q&&b.pageVisible?(k=b.getPageLayout(),n-=k.x*v.width,y-=k.y*v.height):q=!0;if(null==e){e=PrintDialog.createPrintPreview(b,x,v,0,n,y,q);e.pageSelector=!1;e.mathEnabled=!1;n=a.getCurrentFile();null!=n&&(e.title=n.getTitle());var D=e.writeHead;e.writeHead=function(e){D.apply(this,arguments);mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),e.writeln("</style>"));
+function(a,b,e,c,d,f,g,l,n,p){if(null!=e&&null==mxMarker.markers[e]){var t=this.getPackageForType(e);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){x.value=Math.max(1,Math.min(l,Math.max(parseInt(x.value),parseInt(m.value))));m.value=Math.max(1,Math.min(l,Math.min(parseInt(x.value),parseInt(m.value))))}function c(b){function e(b,e,f){var g=b.useCssTransforms,l=b.currentTranslate,n=b.currentScale,p=b.view.translate,t=
+b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var k=b.getGraphBounds(),m=0,y=0,x=ia.get(),v=1/b.pageScale,q=A.checked;if(q)var v=parseInt(K.value),z=parseInt(R.value),v=Math.min(x.height*z/(k.height/b.view.scale),x.width*v/(k.width/b.view.scale));else v=parseInt(u.value)/(100*b.pageScale),isNaN(v)&&(c=1/b.pageScale,u.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*
+c);x.height=Math.ceil(x.height*c);v*=c;!q&&b.pageVisible?(k=b.getPageLayout(),m-=k.x*x.width,y-=k.y*x.height):q=!0;if(null==e){e=PrintDialog.createPrintPreview(b,v,x,0,m,y,q);e.pageSelector=!1;e.mathEnabled=!1;m=a.getCurrentFile();null!=m&&(e.title=m.getTitle());var D=e.writeHead;e.writeHead=function(e){D.apply(this,arguments);mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),e.writeln("</style>"));
null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));if(null!=b.extFonts)for(var c=0;c<b.extFonts.length;c++){var d=b.extFonts[c].name,f=b.extFonts[c].url;0==f.indexOf(Editor.GOOGLE_FONTS)?e.writeln('<link rel="stylesheet" href="'+f+'" charset="UTF-8" type="text/css">'):(e.writeln('<style type="text/css">'),e.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+f+'");\n}'),e.writeln("</style>"))}};if("undefined"!==typeof MathJax){var B=
-e.renderPage;e.renderPage=function(b,e,c,d,f,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var m=B.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}n=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(n=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,f,!0);null!=n&&(d.stylesheet=n,d.refresh())}else{v=
-b.background;if(null==v||""==v||v==mxConstants.NONE)v="#ffffff";e.backgroundColor=v;e.autoOrigin=q;e.appendGraph(b,x,n,y,f,!0);if(null!=b.extFonts&&null!=e.wnd)for(f=0;f<b.extFonts.length;f++)n=b.extFonts[f].name,y=b.extFonts[f].url,0==y.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+y+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+n+'";\n\tsrc: url("'+y+'");\n}'),
-e.wnd.document.writeln("</style>"))}g&&(b.useCssTransforms=g,b.currentTranslate=l,b.currentScale=m,b.view.translate=p,b.view.scale=t);return e}var c=parseInt(ka.value)/100;isNaN(c)&&(c=1,ka.value="100 %");var c=.75*c,f=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(f=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=n.value,l=v.value,p=!t.checked,k=null;p&&(p=g==m&&l==m);if(!p&&null!=a.pages&&a.pages.length){var y=0,p=a.pages.length-1;t.checked||(y=parseInt(g)-1,p=parseInt(l)-
-1);for(var x=y;x<=p;x++){var q=a.pages[x],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,y=!1,A=null,D=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,y=q.viewState.mathEnabled,A=q.viewState.background,D=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);g.background=A;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=l;g.mathEnabled=y;var B=g.getGlobalVariable;g.getGlobalVariable=
-function(b){return"page"==b?q.getName():"pagenumber"==b?x+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}k=e(g,k,x!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else k=e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,b&&(k.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
-k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k));null!=f&&(d.stylesheet=f,d.refresh())}var d=a.editor.graph,f=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,b||mxResources.get("print"));f.appendChild(g);var l=1,m=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText=
-"margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));p.appendChild(g);mxUtils.br(p);var k=t.cloneNode(!0);t.setAttribute("checked","checked");k.setAttribute("value","range");p.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");p.appendChild(g);var n=document.createElement("input");
-n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.style.width="50px";p.appendChild(n);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var v=n.cloneNode(!0);p.appendChild(v);mxEvent.addListener(n,"focus",function(){k.checked=!0});mxEvent.addListener(v,"focus",function(){k.checked=!0});mxEvent.addListener(n,"change",e);mxEvent.addListener(v,"change",e);if(null!=a.pages&&(l=a.pages.length,
-null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){m=g+1;n.value=m;v.value=m;break}n.setAttribute("max",l);v.setAttribute("max",l);a.isPagesEnabled()?1<l&&(f.appendChild(p),k.checked=!0):k.checked=!0;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);g=document.createElement("span");
-mxUtils.write(g,mxResources.get("adjustTo"));y.appendChild(g);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","100 %");u.style.width="50px";y.appendChild(u);mxEvent.addListener(u,"focus",function(){x.checked=!0});f.appendChild(y);var p=p.cloneNode(!1),z=x.cloneNode(!0);z.setAttribute("value","fit");x.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
-g.appendChild(z);p.appendChild(g);y=document.createElement("table");y.style.display="inline-block";var q=document.createElement("tbody"),A=document.createElement("tr"),D=A.cloneNode(!0),C=document.createElement("td"),E=C.cloneNode(!0),G=C.cloneNode(!0),F=C.cloneNode(!0),J=C.cloneNode(!0),I=C.cloneNode(!0);C.style.textAlign="right";F.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
-K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";E.appendChild(K);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));G.appendChild(g);mxUtils.write(F,mxResources.get("fitToBy"));var R=K.cloneNode(!0);J.appendChild(R);mxEvent.addListener(K,"focus",function(){z.checked=!0});mxEvent.addListener(R,"focus",function(){z.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));I.appendChild(g);A.appendChild(C);
-A.appendChild(E);A.appendChild(G);D.appendChild(F);D.appendChild(J);D.appendChild(I);q.appendChild(A);q.appendChild(D);y.appendChild(q);p.appendChild(y);f.appendChild(p);p=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));p.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ia=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
+e.renderPage;e.renderPage=function(b,e,c,d,f,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=B.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}m=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(m=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,f,!0);null!=m&&(d.stylesheet=m,d.refresh())}else{x=
+b.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";e.backgroundColor=x;e.autoOrigin=q;e.appendGraph(b,v,m,y,f,!0);if(null!=b.extFonts&&null!=e.wnd)for(f=0;f<b.extFonts.length;f++)m=b.extFonts[f].name,y=b.extFonts[f].url,0==y.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+y+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+m+'";\n\tsrc: url("'+y+'");\n}'),
+e.wnd.document.writeln("</style>"))}g&&(b.useCssTransforms=g,b.currentTranslate=l,b.currentScale=n,b.view.translate=p,b.view.scale=t);return e}var c=parseInt(ka.value)/100;isNaN(c)&&(c=1,ka.value="100 %");var c=.75*c,f=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(f=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=m.value,l=x.value,p=!t.checked,k=null;p&&(p=g==n&&l==n);if(!p&&null!=a.pages&&a.pages.length){var y=0,p=a.pages.length-1;t.checked||(y=parseInt(g)-1,p=parseInt(l)-
+1);for(var v=y;v<=p;v++){var q=a.pages[v],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,y=!1,z=null,D=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,y=q.viewState.mathEnabled,z=q.viewState.background,D=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);g.background=z;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=l;g.mathEnabled=y;var B=g.getGlobalVariable;g.getGlobalVariable=
+function(b){return"page"==b?q.getName():"pagenumber"==b?v+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}k=e(g,k,v!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else k=e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,b&&(k.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
+k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k));null!=f&&(d.stylesheet=f,d.refresh())}var d=a.editor.graph,f=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,b||mxResources.get("print"));f.appendChild(g);var l=1,n=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText=
+"margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));p.appendChild(g);mxUtils.br(p);var k=t.cloneNode(!0);t.setAttribute("checked","checked");k.setAttribute("value","range");p.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");p.appendChild(g);var m=document.createElement("input");
+m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";p.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var x=m.cloneNode(!0);p.appendChild(x);mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(x,"focus",function(){k.checked=!0});mxEvent.addListener(m,"change",e);mxEvent.addListener(x,"change",e);if(null!=a.pages&&(l=a.pages.length,
+null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;m.value=n;x.value=n;break}m.setAttribute("max",l);x.setAttribute("max",l);a.isPagesEnabled()?1<l&&(f.appendChild(p),k.checked=!0):k.checked=!0;var y=document.createElement("div");y.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");y.appendChild(v);g=document.createElement("span");
+mxUtils.write(g,mxResources.get("adjustTo"));y.appendChild(g);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","100 %");u.style.width="50px";y.appendChild(u);mxEvent.addListener(u,"focus",function(){v.checked=!0});f.appendChild(y);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+g.appendChild(A);p.appendChild(g);y=document.createElement("table");y.style.display="inline-block";var q=document.createElement("tbody"),z=document.createElement("tr"),D=z.cloneNode(!0),C=document.createElement("td"),E=C.cloneNode(!0),G=C.cloneNode(!0),F=C.cloneNode(!0),I=C.cloneNode(!0),J=C.cloneNode(!0);C.style.textAlign="right";F.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
+K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";E.appendChild(K);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));G.appendChild(g);mxUtils.write(F,mxResources.get("fitToBy"));var R=K.cloneNode(!0);I.appendChild(R);mxEvent.addListener(K,"focus",function(){A.checked=!0});mxEvent.addListener(R,"focus",function(){A.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));J.appendChild(g);z.appendChild(C);
+z.appendChild(E);z.appendChild(G);D.appendChild(F);D.appendChild(I);D.appendChild(J);q.appendChild(z);q.appendChild(D);y.appendChild(q);p.appendChild(y);f.appendChild(p);p=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));p.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ia=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
p.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));p.appendChild(g);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";p.appendChild(ka);f.appendChild(p);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&g.appendChild(p);a.isOffline()||
(y=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),y.className="geBtn",g.appendChild(y));PrintDialog.previewEnabled&&(y=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),y.className="geBtn",g.appendChild(y));y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});y.className="geBtn gePrimaryBtn";g.appendChild(y);a.editor.cancelFirst||g.appendChild(p);
f.appendChild(g);this.container=f};var F=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=
this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(F.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var I=document.createElement("canvas"),
J=new Image;J.onload=function(){try{I.getContext("2d").drawImage(J,0,0);var a=I.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};J.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){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
-"\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
-!EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,
-topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,e,c,d,f,l,k){l=null!=l?l:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==e||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
-null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=b+"/log?severity="+l+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(y){}try{k||null==window.console||
-console.error(l,a,e,c,d,f)}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,a.length>
-e&&(a=a.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],e=0;e<arguments.length;e++)null!=arguments[e]&&a.push(arguments[e]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,e,c){function b(a,b){var e=f;f+=b;return a.substring(e,
-f)}function d(a){a=b(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(b(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(b(a,4),"IHDR"!=b(a,4))null!=c&&c();else{b(a,17);do{c=d(a);var g=b(a,4);if(null!=e&&e(f-8,g,c))break;value=b(a,c);b(a,4);if("IEND"==g)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
-EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
+EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
+EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&!EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},
+gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,e,c,d,f,l,k){l=null!=l?l:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==e||-1==a.indexOf("Script error")&&
+-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=b+"/log?severity="+l+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(y){}try{k||
+null==window.console||console.error(l,a,e,c,d,f)}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{e=
+null!=e?e:5E4,a.length>e&&(a=a.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],e=0;e<arguments.length;e++)null!=arguments[e]&&a.push(arguments[e]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,e,c){function b(a,b){var e=
+f;f+=b;return a.substring(e,f)}function d(a){a=b(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(b(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(b(a,4),"IHDR"!=b(a,4))null!=c&&c();else{b(a,17);do{c=d(a);var g=b(a,4);if(null!=e&&e(f-8,g,c))break;value=b(a,c);b(a,4);if("IEND"==g)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml=
+'<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var e=document.createElement("canvas"),c=new Image;c.onload=function(){try{e.getContext("2d").drawImage(c,0,0);var a=e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(l){}};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(m){}try{e=
-document.createElement("canvas");e.width=e.height=1;var d=e.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(a,e,c){return this.editor.graph.openLink(a,e,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,e){e(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,e,c){localStorage.setItem(a,e);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,e){localStorage.removeItem(a);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(n){}try{var e=document.createElement("canvas"),c=new Image;c.onload=function(){try{e.getContext("2d").drawImage(c,0,0);var a=e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(l){}};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(n){}try{e=
+document.createElement("canvas");e.width=e.height=1;var d=e.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(a,e,c){return this.editor.graph.openLink(a,e,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,e){e(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,e,c){localStorage.setItem(a,e);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,e){localStorage.removeItem(a);
e()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
function(a,e,c){c=null!=c?c:24;var b=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=b.spin;b.spin=function(c,f){var g=!1;this.active||(d.call(this,c),this.active=!0,null!=f&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize=
"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,e+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"),"..."!=f.substring(f.length-3,f.length)&&"!"!=f.charAt(f.length-1)&&(f+="..."),g.innerHTML=f,c.appendChild(g),b.status=g,mxClient.IS_VML&&
@@ -3272,14 +3273,14 @@ function(a,e,c){c=null!=c?c:24;var b=new Spinner({lines:12,length:c,width:Math.r
b.pause=function(){return function(){}};return b};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(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=a.apply(this,arguments);if(null==e)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,
-">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),l=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=l?mxUtils.getXml(l):""}catch(v){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
+">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),l=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=l?mxUtils.getXml(l):""}catch(x){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var l=this.updatePageRoot(new DiagramPage(d[f]));
null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[f+1]));b.model.execute(new ChangePage(this,l,0==f?l:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=
-this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,e,c,d,f,l,k,t,n,x,q){e=null!=e?e:this.editor.graph;f=null!=f?f:!1;n=null!=n?n:!0;var b,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?b="_blank":g=b=d;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",
-Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));m=Graph.compress(p);if(Graph.decompress(m)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,m)}m=a.ownerDocument.createElement("mxfile");m.appendChild(p)}x?(m=m.cloneNode(!0),m.removeAttribute("modified"),m.removeAttribute("host"),m.removeAttribute("agent"),m.removeAttribute("etag"),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),
-m.removeAttribute("type")):(m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("pages"),m.removeAttribute("type"),mxClient.IS_CHROMEAPP?m.setAttribute("host","Chrome"):EditorUi.isElectronApp?m.setAttribute("host","Electron"):m.setAttribute("host",window.location.hostname),m.setAttribute("modified",(new Date).toISOString()),m.setAttribute("agent",navigator.appVersion),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("etag",Editor.guid()),
-a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!l&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))q=this.getHtml2(mxUtils.getXml(m),e,null!=c?c.getTitle():null,b,g);else if(l||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),q=this.getEmbeddedSvg(q,e,
-d,null,t,n,g);return q};EditorUi.prototype.getXmlFileData=function(a,e,c){a=null!=a?a:!0;e=null!=e?e:!1;c=null!=c?c:!Editor.compressXml;var b=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var e=a.getElementsByTagName("mxGraphModel"),e=0<e.length?e[0]:null;null==e&&c?(e=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<e.length&&(e=Graph.decompress(e),null!=e&&0<e.length&&a.appendChild(mxUtils.parseXml(e).documentElement))):null==e||c?a=a.cloneNode(!0):
+this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,e,c,d,f,l,k,t,m,v,q){e=null!=e?e:this.editor.graph;f=null!=f?f:!1;m=null!=m?m:!0;var b,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?b="_blank":g=b=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",
+Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));n=Graph.compress(p);if(Graph.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,n)}n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}v?(n=n.cloneNode(!0),n.removeAttribute("modified"),n.removeAttribute("host"),n.removeAttribute("agent"),n.removeAttribute("etag"),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),
+n.removeAttribute("type")):(n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("pages"),n.removeAttribute("type"),mxClient.IS_CHROMEAPP?n.setAttribute("host","Chrome"):EditorUi.isElectronApp?n.setAttribute("host","Electron"):n.setAttribute("host",window.location.hostname),n.setAttribute("modified",(new Date).toISOString()),n.setAttribute("agent",navigator.appVersion),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("etag",Editor.guid()),
+a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a),1<n.getElementsByTagName("diagram").length&&null!=this.pages&&n.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(n):mxUtils.getXml(n);if(!l&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))q=this.getHtml2(mxUtils.getXml(n),e,null!=c?c.getTitle():null,b,g);else if(l||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),q=this.getEmbeddedSvg(q,e,
+d,null,t,m,g);return q};EditorUi.prototype.getXmlFileData=function(a,e,c){a=null!=a?a:!0;e=null!=e?e:!1;c=null!=c?c:!Editor.compressXml;var b=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var e=a.getElementsByTagName("mxGraphModel"),e=0<e.length?e[0]:null;null==e&&c?(e=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<e.length&&(e=Graph.decompress(e),null!=e&&0<e.length&&a.appendChild(mxUtils.parseXml(e).documentElement))):null==e||c?a=a.cloneNode(!0):
(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(e)));b.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(b)),b=this.fileNode.cloneNode(!1),e)a(this.currentPage.node);else for(e=0;e<this.pages.length;e++){if(this.currentPage!=this.pages[e]&&this.pages[e].needsUpdate){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[e].root));this.editor.graph.saveViewState(this.pages[e].viewState,
d);EditorUi.removeChildNodes(this.pages[e].node);mxUtils.setTextContent(this.pages[e].node,Graph.compressNode(d));delete this.pages[e].needsUpdate}a(this.pages[e].node)}return b};EditorUi.prototype.anonymizeString=function(a,e){for(var b=[],c=0;c<a.length;c++){var d=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?b.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?b.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?b.push(String.fromCharCode(97+Math.round(25*Math.random()))):
/\s/.test(d)?b.push(" "):b.push("?"):b.push(e?"0":Math.round(9*Math.random()))}return b.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(l){a[EditorUi.DIFF_INSERT][b].data=
@@ -3287,9 +3288,9 @@ l.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]
delete f.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,e){if(null!=a.attributes)for(var b=0;b<a.attributes.length;b++)"as"!=a.attributes[b].name&&a.setAttribute(a.attributes[b].name,this.anonymizeString(a.attributes[b].value,e));if(null!=a.childNodes)for(b=
0;b<a.childNodes.length;b++)this.anonymizeAttributes(a.childNodes[b],e)};EditorUi.prototype.anonymizeNode=function(a,e){for(var b=a.getElementsByTagName("mxCell"),c=0;c<b.length;c++)null!=b[c].getAttribute("value")&&b[c].setAttribute("value","["+b[c].getAttribute("value").length+"]"),null!=b[c].getAttribute("xmlValue")&&b[c].setAttribute("xmlValue","["+b[c].getAttribute("xmlValue").length+"]"),null!=b[c].getAttribute("style")&&b[c].setAttribute("style","["+b[c].getAttribute("style").length+"]"),null!=
b[c].parentNode&&"root"!=b[c].parentNode.nodeName&&null!=b[c].parentNode.parentNode&&(b[c].setAttribute("id",b[c].parentNode.getAttribute("id")),b[c].parentNode.parentNode.replaceChild(b[c],b[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),
-this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,e,c,d,f,l,k,t,n,x){f=null!=f?f:!0;l=null!=l?l:!1;var b=this.editor.graph;if(e||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))if(x=
-!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=b.getGlobalVariable,b=this.createTemporaryGraph(b.getStylesheet()),m=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(m.root)}k=null!=k?k:this.getXmlFileData(f,l,x);n=null!=n?n:this.getCurrentFile();a=this.createFileData(k,b,n,window.location.href,a,e,c,d,f,t,x);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);
-return a};EditorUi.prototype.getHtml=function(a,e,c,d,f,l){l=null!=l?l:!0;var b=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){var b=l?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells()),m=e.view.scale;l=Math.floor(b.x/m-e.view.translate.x);m=Math.floor(b.y/m-e.view.translate.y);b=e.background;null==f&&(e=this.getBasenames().join(";"),0<e.length&&(g=EditorUi.drawHost+"/embed.js?s="+e));a.setAttribute("x0",l);a.setAttribute("y0",m)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,e,c,d,f,l,k,t,m,v){f=null!=f?f:!0;l=null!=l?l:!1;var b=this.editor.graph;if(e||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))if(v=
+!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=b.getGlobalVariable,b=this.createTemporaryGraph(b.getStylesheet()),n=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(n.root)}k=null!=k?k:this.getXmlFileData(f,l,v);m=null!=m?m:this.getCurrentFile();a=this.createFileData(k,b,m,window.location.href,a,e,c,d,f,t,v);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);
+return a};EditorUi.prototype.getHtml=function(a,e,c,d,f,l){l=null!=l?l:!0;var b=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){var b=l?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells()),n=e.view.scale;l=Math.floor(b.x/n-e.view.translate.x);n=Math.floor(b.y/n-e.view.translate.y);b=e.background;null==f&&(e=this.getBasenames().join(";"),0<e.length&&(g=EditorUi.drawHost+"/embed.js?s="+e));a.setAttribute("x0",l);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!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=b&&b!=mxConstants.NONE?' style="background-color:'+b+';">':">")+'\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==f?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,e,c,d,f){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=f&&(f=f.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));
@@ -3298,26 +3299,26 @@ mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==f?'<script type="tex
null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(mxResources.get("notADiagramFile")+" ("+b+")");b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var c=null;this.fileNode=a;this.pages=[];for(var d=0;d<b.length;d++)null==b[d].getAttribute("id")&&b[d].setAttribute("id",d),a=new DiagramPage(b[d]),
null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(c=a);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var l=this.editor.graph.getModel(),k=l.getChildren(l.root),d=0;d<k.length;d++){var t=k[d];l.setVisible(t,a[t.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,e,c,d,f,l,k,t,n,x,q){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var b=this.getBaseFilename(!f),
-g=b+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,e);this.saveData(g,a,m,"text/xml")}else if("html"==a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,b),this.saveData(g,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=b+".png":"jpeg"==a&&(g=b+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,e){try{var c=this.editor.graph.pageVisible;
-null!=l&&(this.editor.graph.pageVisible=l);var g=this.createDownloadRequest(b,a,d,e,k,f,t,n,x,q);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var p=null,y=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(p)}))});if("svg"==a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=
-null;var D=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=b+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();y(a)}),d)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=
-function(a,e,c,d,f,l,k,t,n,x){var b=this.editor.graph,g=b.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=e);var m="",p="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==e&&0==l&&(p="&allPages=1");if("xmlpng"==e&&(x="1",e="png",null!=this.pages&&null!=this.currentPage))for(l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){m="&from="+l;break}l=b.background;"png"!=e&&"pdf"!=e||!f?f||
-null!=l&&l!=mxConstants.NONE||(l="#ffffff"):l=mxConstants.NONE;f={globalVars:b.getExportVariables()};n&&(f.grid={size:b.gridSize,steps:b.view.gridSteps,color:b.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+e+m+p+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+d+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=k?"&scale="+k:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,
+this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,e,c,d,f,l,k,t,m,v,q){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var b=this.getBaseFilename(!f),
+g=b+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,e);this.saveData(g,a,n,"text/xml")}else if("html"==a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,b),this.saveData(g,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=b+".png":"jpeg"==a&&(g=b+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,e){try{var c=this.editor.graph.pageVisible;
+null!=l&&(this.editor.graph.pageVisible=l);var g=this.createDownloadRequest(b,a,d,e,k,f,t,m,v,q);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var p=null,y=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(p)}))});if("svg"==a){var x=this.editor.graph.background;if(k||x==mxConstants.NONE)x=
+null;var D=this.editor.graph.getSvg(x,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=b+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();y(a)}),d)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=
+function(a,e,c,d,f,l,k,t,m,v){var b=this.editor.graph,g=b.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=e);var n="",p="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};v=v?"1":"0";"pdf"==e&&0==l&&(p="&allPages=1");if("xmlpng"==e&&(v="1",e="png",null!=this.pages&&null!=this.currentPage))for(l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){n="&from="+l;break}l=b.background;"png"!=e&&"pdf"!=e||!f?f||
+null!=l&&l!=mxConstants.NONE||(l="#ffffff"):l=mxConstants.NONE;f={globalVars:b.getExportVariables()};m&&(f.grid={size:b.gridSize,steps:b.view.gridSteps,color:b.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+e+n+p+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+d+"&embedXml="+v+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=k?"&scale="+k:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,
e){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,e,c){var b=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,g=null,l=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()),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(l,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();l()}));m();l()}null!=e&&e()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&!this.editor.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.editor.loadUrl(f,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=
-new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,l=f.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=l.getCell(a.getAttribute("id"));if(null!=t){try{var n=a.getAttribute("value");if(null!=n){var x=
-mxUtils.parseXml(n).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))l.setValue(t,x);else for(var q=x.attributes,A=0;A<q.length;A++)f.setAttributeForCell(t,q[A].nodeName,0<q[A].nodeValue.length?q[A].nodeValue:null)}}catch(u){null!=window.console&&console.log("Error in value for "+t.id+": "+u)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(t,C)}catch(u){null!=window.console&&console.log("Error in style for "+t.id+": "+u)}try{var z=a.getAttribute("icon");if(null!=z){var E=
-0<z.length?JSON.parse(z):null;null!=E&&E.append||f.removeCellOverlays(t);null!=E&&f.addCellOverlay(t,b(E))}}catch(u){null!=window.console&&console.log("Error in icon for "+t.id+": "+u)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),F=f.getCellGeometry(t);if(null!=F){F=F.clone();for(key in G){var I=parseFloat(G[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(G[key])}f.model.setGeometry(t,F)}}}catch(u){null!=window.console&&
+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,g=null,l=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()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
+n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=e&&e()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&!this.editor.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.editor.loadUrl(f,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=
+new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,l=f.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=l.getCell(a.getAttribute("id"));if(null!=t){try{var m=a.getAttribute("value");if(null!=m){var v=
+mxUtils.parseXml(m).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))l.setValue(t,v);else for(var q=v.attributes,z=0;z<q.length;z++)f.setAttributeForCell(t,q[z].nodeName,0<q[z].nodeValue.length?q[z].nodeValue:null)}}catch(u){null!=window.console&&console.log("Error in value for "+t.id+": "+u)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(t,C)}catch(u){null!=window.console&&console.log("Error in style for "+t.id+": "+u)}try{var A=a.getAttribute("icon");if(null!=A){var E=
+0<A.length?JSON.parse(A):null;null!=E&&E.append||f.removeCellOverlays(t);null!=E&&f.addCellOverlay(t,b(E))}}catch(u){null!=window.console&&console.log("Error in icon for "+t.id+": "+u)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),F=f.getCellGeometry(t);if(null!=F){F=F.clone();for(key in G){var I=parseFloat(G[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(G[key])}f.model.setGeometry(t,F)}}}catch(u){null!=window.console&&
console.log("Error in icon for "+t.id+": "+u)}}}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,l)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
-parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return c};EditorUi.prototype.getCopyFilename=function(a,e){var b=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=b.lastIndexOf(".");0<=d&&(c=b.substring(d),b=b.substring(0,d));if(e)var f=new Date,d=f.getFullYear(),k=f.getMonth()+1,t=f.getDate(),n=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),b=b+(" "+(d+"-"+k+"-"+t+"-"+n+"-"+x+"-"+f));
+parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return c};EditorUi.prototype.getCopyFilename=function(a,e){var b=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=b.lastIndexOf(".");0<=d&&(c=b.substring(d),b=b.substring(0,d));if(e)var f=new Date,d=f.getFullYear(),k=f.getMonth()+1,t=f.getDate(),m=f.getHours(),v=f.getMinutes(),f=f.getSeconds(),b=b+(" "+(d+"-"+k+"-"+t+"-"+m+"-"+v+"-"+f));
return b=mxResources.get("copyOf",[b])+c};EditorUi.prototype.fileLoaded=function(a,e){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=b&&(EditorUi.debug("File.closed",[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);!e&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()});e?f():this.handleError(v,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,e){var b=0,c=new mxGraphModel,d=new mxCodec;null!=e&&(e.byteCount=
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()});e?f():this.handleError(x,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,e){var b=0,c=new mxGraphModel,d=new mxCodec;null!=e&&(e.byteCount=
0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var k=a[f].node.cloneNode(!1);k.removeAttribute("name");c.root=a[f].root;var t=d.encode(c);this.editor.graph.saveViewState(a[f].viewState,t,!0);t.removeAttribute("pageWidth");t.removeAttribute("pageHeight");k.appendChild(t);null!=e&&(e.eltCount+=k.getElementsByTagName("*").length,e.nodeCount+=k.getElementsByTagName("mxCell").length);b=(b<<5)-b+this.hashValue(k,function(a,b,e,c){return!c||"mxGeometry"!=
a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?c&&"mxCell"==a.nodeName&&"previous"==b?null:e:Math.round(e)},e)<<0}return b};EditorUi.prototype.hashValue=function(a,e,c){var b=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(b^=this.hashValue(a.nodeName,e,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var f=a.attributes[d].name,
g=null!=e?e(a,f,a.attributes[d].value,!0):a.attributes[d].value;null!=g&&(b^=this.hashValue(f,e,c)+this.hashValue(g,e,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)b=(b<<5)-b+this.hashValue(a.childNodes[d],e,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);e=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)e=(e<<5)-e+a.charCodeAt(d)<<0;b^=e}return b};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
@@ -3326,325 +3327,326 @@ c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.app
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,e){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"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,e,c,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var b=this.sidebar.palettes[a.getHash()],b=null!=b?b[b.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=
null,g=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);c=null!=c&&0<c.length?c:a.getTitle();var p=this.sidebar.addPalette(a.getHash(),c,null!=d?d:!0,mxUtils.bind(this,function(a){g(e,a)}));this.repositionLibrary(b);var k=p.parentNode.previousSibling;d=k.getAttribute("title");
-null!=d&&0<d.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");k.style.position="relative";var q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get("close"));q.setAttribute("valign","absmiddle");
-q.setAttribute("border","0");q.style.cursor="pointer";q.style.margin="0 3px";var A=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var C=this.editor.graph,z=null,
-E=mxUtils.bind(this,function(b){this.showLibraryDialog(a.getTitle(),p,e,a,a.getMode());mxEvent.consume(b)}),G=mxUtils.bind(this,function(b){a.setModified(!0);a.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=q.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="2px",z.style.marginTop="-2px",n.insertBefore(z,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),
-e,a,a.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),k.style.paddingRight=18*n.childNodes.length+"px")})):null==A&&(A=q.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),n.insertBefore(A,n.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(b){this.saveLibrary(a.getTitle(),e,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==A||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+
-"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(b)})),k.style.paddingRight=18*n.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,b,c,d){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=C.getCellGeometry(a[g]);null!=l&&l.translate(-b.x,-b.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,b.width,b.height,d||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:b.width,h:b.height};null!=d&&
+null!=d&&0<d.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");k.style.position="relative";var q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get("close"));q.setAttribute("valign","absmiddle");
+q.setAttribute("border","0");q.style.cursor="pointer";q.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var C=this.editor.graph,A=null,
+E=mxUtils.bind(this,function(b){this.showLibraryDialog(a.getTitle(),p,e,a,a.getMode());mxEvent.consume(b)}),G=mxUtils.bind(this,function(b){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=q.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",m.insertBefore(A,m.firstChild),k.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),
+e,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),k.style.paddingRight=18*m.childNodes.length+"px")})):null==z&&(z=q.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),m.insertBefore(z,m.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(b){this.saveLibrary(a.getTitle(),e,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(k.style.paddingRight=18*m.childNodes.length+
+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(b)})),k.style.paddingRight=18*m.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,b,c,d){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=C.getCellGeometry(a[g]);null!=l&&l.translate(-b.x,-b.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,b.width,b.height,d||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:b.width,h:b.height};null!=d&&
(a.title=d);e.push(a);G(c);null!=f&&null!=f.parentNode&&0<e.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(C.isSelectionEmpty())C.getRubberband().isActive()?(C.getRubberband().execute(a),C.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=C.getSelectionCells(),c=C.view.getBounds(b),e=C.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=C.view.translate.x;c.y-=C.view.translate.y;
F(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,function(){},mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(p.style.backgroundColor=
"",p.style.cursor="default",this.sidebar.showTooltips=!0,C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=!1,C.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,
-function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(b,c,d,l,m,k,t,n,y){if(null!=b&&"image/"==c.substring(0,6))b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(b),b=[new mxCell("",new mxGeometry(0,0,m,k),b)],b[0].vertex=!0,F(b,new mxRectangle(0,0,m,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<e.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,x=mxUtils.bind(this,function(b,c){if(null!=b&&"application/pdf"==c){var d=Editor.extractGraphModelFromPdf(b);null!=d&&0<d.length&&(b=d)}if(null!=b)if(d=mxUtils.parseXml(b),"mxlibrary"==d.documentElement.nodeName)try{var l=
-JSON.parse(mxUtils.getTextContent(d.documentElement));g(l,p);e=e.concat(l);G(a);this.spinner.stop();v=!0}catch(M){}else if("mxfile"==d.documentElement.nodeName)try{for(var m=d.documentElement.getElementsByTagName("diagram"),l=0;l<m.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(m[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,t.width,t.height),a)}v=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<e.length&&(f.parentNode.removeChild(f),f=null)});null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(y,function(a){x(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(b,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));n.insertBefore(q,n.firstChild);mxEvent.addListener(q,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
-p&&E(a)});d=q.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));n.insertBefore(d,n.firstChild);mxEvent.addListener(d,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(a)})),n.insertBefore(d,n.firstChild))}k.appendChild(n);k.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,c){for(var b=0;b<a.length;b++){var e=a[b],d=e.data;if(null!=d){var d=this.convertDataUri(d),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+d,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(d=this.stringToCells(Graph.decompress(e.xml)),
+function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(b,c,d,l,n,k,t,m,y){if(null!=b&&"image/"==c.substring(0,6))b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(b),b=[new mxCell("",new mxGeometry(0,0,n,k),b)],b[0].vertex=!0,F(b,new mxRectangle(0,0,n,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<e.length&&(f.parentNode.removeChild(f),f=null);else{var x=!1,v=mxUtils.bind(this,function(b,c){if(null!=b&&"application/pdf"==c){var d=Editor.extractGraphModelFromPdf(b);null!=d&&0<d.length&&(b=d)}if(null!=b)if(d=mxUtils.parseXml(b),"mxlibrary"==d.documentElement.nodeName)try{var l=
+JSON.parse(mxUtils.getTextContent(d.documentElement));g(l,p);e=e.concat(l);G(a);this.spinner.stop();x=!0}catch(M){}else if("mxfile"==d.documentElement.nodeName)try{for(var n=d.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(n[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,t.width,t.height),a)}x=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<e.length&&(f.parentNode.removeChild(f),f=null)});null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(y,function(a){v(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)&&null!=y?this.parseFile(y,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(b,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));m.insertBefore(q,m.firstChild);mxEvent.addListener(q,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
+p&&E(a)});d=q.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));m.insertBefore(d,m.firstChild);mxEvent.addListener(d,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(a)})),m.insertBefore(d,m.firstChild))}k.appendChild(m);k.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,c){for(var b=0;b<a.length;b++){var e=a[b],d=e.data;if(null!=d){var d=this.convertDataUri(d),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+d,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(d=this.stringToCells(Graph.decompress(e.xml)),
0<d.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(d,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
-Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,c,d,f,m){a=new ImageDialog(this,a,c,d,f,m);this.showDialog(a.container,Graph.fileSupport?
-480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,c){a=null!=a?a:mxUtils.bind(this,function(a,b){if(!b){var c=new ChangePageSetup(this,null,a);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var b=new BackgroundImageDialog(this,a,c);this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,c,d,f,m){a=new LibraryDialog(this,a,c,d,f,m);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
+Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,c,d,f,n){a=new ImageDialog(this,a,c,d,f,n);this.showDialog(a.container,Graph.fileSupport?
+480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,c){a=null!=a?a:mxUtils.bind(this,function(a,b){if(!b){var c=new ChangePageSetup(this,null,a);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var b=new BackgroundImageDialog(this,a,c);this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,c,d,f,n){a=new LibraryDialog(this,a,c,d,f,n);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var c=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=c.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow=
"hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));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,d,f,m,l,k){var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(z){}if(null!=e||null!=c){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),
-p=null;c=null!=c?c:mxResources.get("error");if(null!=e){null!=e.retry&&(g=mxResources.get("cancel"),p=function(){b();e.retry()});if(404==e.code||404==e.status||403==e.code){k=403==e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var n=null!=l?l:window.location.hash;
-if(null!=n&&("#G"==n.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==n.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==e.code||404==e.status)){n="#U"==n.substring(0,2)?n.substring(45,n.lastIndexOf("%26ex")):n.substring(2);this.showError(c,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+
-n);this.handleError(a,c,d,f,m)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;d.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");d.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=b.length;
+a.appendChild(c);return a};EditorUi.prototype.handleError=function(a,c,d,f,n,l,k){var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(A){}if(null!=e||null!=c){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),
+p=null;c=null!=c?c:mxResources.get("error");if(null!=e){null!=e.retry&&(g=mxResources.get("cancel"),p=function(){b();e.retry()});if(404==e.code||404==e.status||403==e.code){k=403==e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var m=null!=l?l:window.location.hash;
+if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==e.code||404==e.status)){m="#U"==m.substring(0,2)?m.substring(45,m.lastIndexOf("%26ex")):m.substring(2);this.showError(c,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+
+m);this.handleError(a,c,d,f,n)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;d.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");d.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=b.length;
d.appendChild(c)}var b=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var d=document.createElement("select");d.style.width="200px";a();mxEvent.addListener(d,"change",mxUtils.bind(this,function(){var c=d.value,e=b.length!=c;e&&this.drive.setUser(b[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
!0)}));c.appendChild(d);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=e.message?k=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?k=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):
-e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=l=null;null!=e&&null!=e.helpLink&&(l=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(c,k,g,d,p,null,null,l,v,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,c,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),c);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,c,d,f,
-m,l){var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){b();null!=c&&c()},function(){b();null!=d&&d()},f,m,null,null,null,null,e);this.showDialog(a.container,340,46+e,!0,l);a.init()};EditorUi.prototype.showBanner=function(a,c,d){var b=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
+e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var x=l=null;null!=e&&null!=e.helpLink&&(l=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(c,k,g,d,p,null,null,l,x,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,c,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),c);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,c,d,f,
+n,l){var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){b();null!=c&&c()},function(){b();null!=d&&d()},f,n,null,null,null,null,e);this.showDialog(a.container,340,46+e,!0,l);a.init()};EditorUi.prototype.showBanner=function(a,c,d){var b=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";b=document.createElement("img");b.setAttribute("src",IMAGE_PATH+
"/logo.png");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(b);b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.setAttribute("border","0");b.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(b);mxUtils.write(e,c);document.body.appendChild(e);
this.bannerShowing=!0;var f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";f.appendChild(g);c=document.createElement("label");c.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(c,mxResources.get("doNotShowAgain"));f.appendChild(c);e.style.paddingBottom="30px";e.appendChild(f);var k=mxUtils.bind(this,
-function(){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(e,"click",
-mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);b!=g&&b!=c?(d(),k(),mxEvent.consume(a)):n()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);b=!0}return b};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};
-EditorUi.prototype.createImageDataUri=function(a,c,d,f){var b=a.toDataURL("image/"+d);if(6>=b.length||b==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c)));0<f&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",f));return b};EditorUi.prototype.saveCanvas=function(a,c,d,f,m){var b="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+"."+b;a=this.createImageDataUri(a,c,d,m);this.saveData(f,b,a.substring(a.lastIndexOf(",")+
+function(){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));var m=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(e,"click",
+mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);b!=g&&b!=c?(d(),k(),mxEvent.consume(a)):m()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(m,3E4);b=!0}return b};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};
+EditorUi.prototype.createImageDataUri=function(a,c,d,f){var b=a.toDataURL("image/"+d);if(6>=b.length||b==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c)));0<f&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",f));return b};EditorUi.prototype.saveCanvas=function(a,c,d,f,n){var b="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+"."+b;a=this.createImageDataUri(a,c,d,n);this.saveData(f,b,a.substring(a.lastIndexOf(",")+
1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,c){var b=new TextareaDialog(this,a,c,null,null,mxResources.get("close"));b.textarea.style.width="600px";b.textarea.style.height="380px";this.showDialog(b.container,
-620,460,!0,!0,null,null,null,null,!0);b.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,c,d,f,m,l){"text/xml"!=d||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||(c=c+"."+(null!=l?l:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,c);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",
+620,460,!0,!0,null,null,null,null,!0);b.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,c,d,f,n,l){"text/xml"!=d||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||(c=c+"."+(null!=l?l:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,c);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",
!0,c),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(c+":",a):this.openInNewWindow(a,d,f);else{var b=document.createElement("a");l=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof b.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);l=65==(e?parseInt(e[2],10):!1)?!1:l}if(l||this.isOffline()){b.href=URL.createObjectURL(f?
-this.base64ToBlob(a,d):new Blob([a],{type:d}));l?b.download=c:b.setAttribute("target","_blank");document.body.appendChild(b);try{window.setTimeout(function(){URL.revokeObjectURL(b.href)},2E4),b.click(),b.parentNode.removeChild(b)}catch(y){}}else this.createEchoRequest(a,c,d,f,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,c,d,f,m,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=m?"&format="+m:"")+(null!=l?"&base64="+
-l:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,c){c=c||"";for(var b=atob(a),e=b.length,d=Math.ceil(e/1024),f=Array(d),k=0;k<d;++k){for(var t=1024*k,n=Math.min(t+1024,e),x=Array(n-t),q=0;t<n;++q,++t)x[q]=b[t].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:c})};EditorUi.prototype.saveLocalFile=function(a,c,d,f,m,l,k,t){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(l);
-isLocalStorage&&m++;var b=4>=m?2:6<m?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,f);else{var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),e.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(a,b,d,f,null,t):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(e){try{this.exportFile(a,
-b,d,f,c,e)}catch(z){this.handleError(z)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,k,null,1<m,b,a,d,f);l=this.isServices(m)?m>b?390:270:160;this.showDialog(c.container,400,l,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(a,c,d){var b=window.open("about:blank");null==b||null==b.document?mxUtils.popup(a,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?b.document.write("<html>"+
+this.base64ToBlob(a,d):new Blob([a],{type:d}));l?b.download=c:b.setAttribute("target","_blank");document.body.appendChild(b);try{window.setTimeout(function(){URL.revokeObjectURL(b.href)},2E4),b.click(),b.parentNode.removeChild(b)}catch(y){}}else this.createEchoRequest(a,c,d,f,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,c,d,f,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+
+l:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,c){c=c||"";for(var b=atob(a),e=b.length,d=Math.ceil(e/1024),f=Array(d),k=0;k<d;++k){for(var t=1024*k,m=Math.min(t+1024,e),v=Array(m-t),q=0;t<m;++q,++t)v[q]=b[t].charCodeAt(0);f[k]=new Uint8Array(v)}return new Blob(f,{type:c})};EditorUi.prototype.saveLocalFile=function(a,c,d,f,n,l,k,t){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(l);
+isLocalStorage&&n++;var b=4>=n?2:6<n?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,f);else{var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),e.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(a,b,d,f,null,t):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(e){try{this.exportFile(a,
+b,d,f,c,e)}catch(A){this.handleError(A)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,k,null,1<n,b,a,d,f);l=this.isServices(n)?n>b?390:270:160;this.showDialog(c.container,400,l,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(a,c,d){var b=window.open("about:blank");null==b||null==b.document?mxUtils.popup(a,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?b.document.write("<html>"+
a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),b.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+a+'"/></html>')):b.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),b.document.close())};var f=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 e=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=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var d=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});d.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){d.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.style.backgroundColor="white";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)}),null,null,null,null,null,null,null,5);mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
-Editor.cameraLargeImage,mxResources.get("export"))}f.apply(this,arguments)};EditorUi.prototype.saveData=function(a,c,d,f,m){this.isLocalFileSave()?this.saveLocalFile(d,a,f,m,c):this.saveRequest(a,c,mxUtils.bind(this,function(a,b){return this.createEchoRequest(d,a,f,m,c,b)}),d,m,f)};EditorUi.prototype.saveRequest=function(a,c,d,f,m,l,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var b=this.getServiceCount(!1);isLocalStorage&&b++;var e=4>=b?2:6<b?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
-function(a,b){if("_blank"==b||null!=a&&0<a.length){var e=d("_blank"==b?null:a,b==App.MODE_DEVICE||"download"==b||null==b||"_blank"==b?"0":"1");null!=e&&(b==App.MODE_DEVICE||"download"==b||"_blank"==b?e.simulate(document,"_blank"):this.pickFolder(b,mxUtils.bind(this,function(d){l=null!=l?l:"pdf"==c?"application/pdf":"image/"+c;if(null!=f)try{this.exportFile(f,a,l,!0,b,d)}catch(z){this.handleError(z)}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,l,!0,b,d)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<b,e,f,l,m);b=this.isServices(b)?4<b?390:270:160;this.showDialog(a.container,380,b,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
-a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,c,d,f,m,l){};EditorUi.prototype.pickFolder=function(a,c,d){c(null)};EditorUi.prototype.exportSvg=function(a,c,d,f,m,l,k,t,n,x,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;var e=c?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==c&&(e=q?this.editor.graph.defaultPageBackgroundColor:
-"#ffffff");var g=this.editor.graph.getSvg(e,a,k,t,null,d,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,q);f&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",y=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,n,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
-b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,y,this.thumbImageCache)):y(g)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,c,d,f,m,l,k){return this.addCheckbox(a,
-d,f,m,l,k,!0,c)};EditorUi.prototype.addCheckbox=function(a,c,d,f,m,l,k,n){l=null!=l?l:!0;var b=document.createElement("input");b.style.marginRight="8px";b.style.marginTop="16px";b.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();b.id=k;null!=n&&b.setAttribute("name",n);d&&(b.setAttribute("checked","checked"),b.defaultChecked=!0);f&&b.setAttribute("disabled","disabled");l&&(a.appendChild(b),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",k),a.appendChild(d),
-m||mxUtils.br(a));return b};EditorUi.prototype.addEditButton=function(a,c){var b=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);b.style.marginLeft="24px";var e=this.getCurrentFile(),d="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,
+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)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
+Editor.cameraLargeImage,mxResources.get("export"))}f.apply(this,arguments)};EditorUi.prototype.saveData=function(a,c,d,f,n){this.isLocalFileSave()?this.saveLocalFile(d,a,f,n,c):this.saveRequest(a,c,mxUtils.bind(this,function(a,b){return this.createEchoRequest(d,a,f,n,c,b)}),d,n,f)};EditorUi.prototype.saveRequest=function(a,c,d,f,n,l,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var b=this.getServiceCount(!1);isLocalStorage&&b++;var e=4>=b?2:6<b?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
+function(a,b){if("_blank"==b||null!=a&&0<a.length){var e=d("_blank"==b?null:a,b==App.MODE_DEVICE||"download"==b||null==b||"_blank"==b?"0":"1");null!=e&&(b==App.MODE_DEVICE||"download"==b||"_blank"==b?e.simulate(document,"_blank"):this.pickFolder(b,mxUtils.bind(this,function(d){l=null!=l?l:"pdf"==c?"application/pdf":"image/"+c;if(null!=f)try{this.exportFile(f,a,l,!0,b,d)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,l,!0,b,d)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<b,e,f,l,n);b=this.isServices(b)?4<b?390:270:160;this.showDialog(a.container,380,b,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
+a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,c,d,f,n,l){};EditorUi.prototype.pickFolder=function(a,c,d){c(null)};EditorUi.prototype.exportSvg=function(a,c,d,f,n,l,k,t,m,v,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;var e=c?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==c&&(e=q?this.editor.graph.defaultPageBackgroundColor:
+"#ffffff");var g=this.editor.graph.getSvg(e,a,k,t,null,d,null,null,"blank"==v?"_blank":"self"==v?"_top":null,null,!0,q);f&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",y=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,m,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
+b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,y,this.thumbImageCache)):y(g)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,c,d,f,n,l,k){return this.addCheckbox(a,
+d,f,n,l,k,!0,c)};EditorUi.prototype.addCheckbox=function(a,c,d,f,n,l,k,t){l=null!=l?l:!0;var b=document.createElement("input");b.style.marginRight="8px";b.style.marginTop="16px";b.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();b.id=k;null!=t&&b.setAttribute("name",t);d&&(b.setAttribute("checked","checked"),b.defaultChecked=!0);f&&b.setAttribute("disabled","disabled");l&&(a.appendChild(b),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",k),a.appendChild(d),
+n||mxUtils.br(a));return b};EditorUi.prototype.addEditButton=function(a,c){var b=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);b.style.marginLeft="24px";var e=this.getCurrentFile(),d="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,
mxResources.get("makeCopy"));f.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");f.appendChild(e);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=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(b,"change",mxUtils.bind(this,function(){b.checked&&(null==c||c.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return b.checked?"blank"===f.value?"_blank":d:null},getEditInput:function(){return b},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,c){function b(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+
f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var e=document.createElement("select");e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value",
"blank");mxUtils.write(d,mxResources.get("openInNewWindow"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));e.appendChild(d);c&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(d));a.appendChild(e);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",k=null,k=mxUtils.button("",
mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(a)}));b();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=
-function(a,c,d,f,m,l,k){k=null!=k?k:[];f&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=c&&c!=mxConstants.NONE&&k.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=m&&0<m.length&&k.push("edit="+encodeURIComponent(m)),l&&k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&k.push("page-id="+this.currentPage.getId());return k};EditorUi.prototype.createLink=function(a,c,d,f,m,l,k,n,
-y){y=null!=y?y:this.createUrlParameters(a,c,d,f,m,l);a=this.getCurrentFile();c=!0;null!=k?d="#U"+encodeURIComponent(k):(a=this.getCurrentFile(),n||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),c=!1));c&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(a.getTitle()));return(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,c,d,f,m,l,k,n,y,x,q){this.getBasenames();var b={};""!=m&&m!=mxConstants.NONE&&(b.highlight=m);"auto"!==f&&(b.target=f);y||(b.lightbox=!1);b.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(b.zoom=d/100);d=[];k&&(d.push("pages"),b.resize=!0,null!=this.pages&&null!=this.currentPage&&
-(b.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),b.resize=!0);n&&d.push("layers");0<d.length&&(y&&d.push("lightbox"),b.toolbar=d.join(" "));null!=x&&0<x.length&&(b.edit=x);null!=a?b.url=a:b.xml=this.getFileData(!0,null,null,null,null,!k);c='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(c,'<script type="text/javascript" src="'+
-(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,c,d,f){var b=document.createElement("div");b.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";
-b.appendChild(e);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");e=p.cloneNode(!0);e.setAttribute("value","copy");g.appendChild(e);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));
-g.appendChild(k);mxUtils.br(g);g.appendChild(p);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var n=this.getCurrentFile();null==d&&null!=n&&n.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));
-e.setAttribute("checked","checked");null==d&&p.setAttribute("disabled","disabled");b.appendChild(g);var q=this.addLinkSection(b),A=this.addCheckbox(b,mxResources.get("zoom"),!0,null,!0);mxUtils.write(b,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";b.appendChild(C);var z=this.addCheckbox(b,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=
-E=this.addCheckbox(b,mxResources.get("allPages"),g,!g),G=this.addCheckbox(b,mxResources.get("layers"),!0),F=this.addCheckbox(b,mxResources.get("lightbox"),!0),I=this.addEditButton(b,F),J=I.getEditInput();J.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,b,
-mxUtils.bind(this,function(){f(p.checked?d:null,A.checked,C.value,q.getTarget(),q.getColor(),z.checked,E.checked,G.checked,F.checked,I.getLink())}),null,a,c);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,c,d,f,m,l,k){k=document.createElement("div");k.style.whiteSpace="nowrap";var b=document.createElement("h3");mxUtils.write(b,a||mxResources.get("link"));b.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(b);
-var e=this.getCurrentFile(),b="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=e&&e.constructor==window.DriveFile&&!c){a=80;var b="https://desk.draw.io/support/solutions/articles/16000039384",g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));g.appendChild(p);
-p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(e.getId())}));p.style.marginTop="12px";p.className="geBtn";g.appendChild(p);k.appendChild(g);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));g.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
-mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,q=null;if(null!=d||null!=f)a+=30,mxUtils.write(k,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%",k.appendChild(n),mxUtils.write(k,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=f+"px",k.appendChild(q),mxUtils.br(k);var v=this.addLinkSection(k,l);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==e||e.constructor!=window.DriveFile||c)E=this.addCheckbox(k,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(k,mxResources.get("lightbox"),!0),
-F=this.addEditButton(k,G),I=F.getEditInput(),J=this.addCheckbox(k,mxResources.get("layers"),!0);J.style.marginLeft=I.style.marginLeft;J.style.marginBottom="16px";J.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(J.removeAttribute("disabled"),I.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));I.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});
-c=new CustomDialog(this,k,mxUtils.bind(this,function(){m(v.getTarget(),v.getColor(),null==E?!0:E.checked,G.checked,F.getLink(),J.checked,null!=n?n.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),b);this.showDialog(c.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)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,c,d,f,m){var b=document.createElement("div");
-b.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:"+(m?"10":"4")+"px";b.appendChild(e);if(m){mxUtils.write(b,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";b.appendChild(g);mxUtils.write(b,
-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";b.appendChild(p);mxUtils.br(b)}var k=this.addCheckbox(b,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=f?null:this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,q=f?null:this.addCheckbox(b,mxResources.get("transparentBackground"),
-e.background==mxConstants.NONE||null==e.background);null!=q&&(q.style.marginBottom="16px");a=new CustomDialog(this,b,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(p.value)||0;d(!k.checked,null!=n?n.checked:!1,null!=q?q.checked:!1,a,b)}),null,a,c);this.showDialog(a.container,300,(m?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,c,d,f,m,l,k,n){k=null!=k?k:!0;var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=this.editor.graph,g="jpeg"==
-n?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";b.appendChild(p);mxUtils.write(b,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";b.appendChild(t);mxUtils.write(b,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";b.appendChild(q);mxUtils.br(b);var v=this.addCheckbox(b,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),G=null;"dark"==uiTheme&&(G=this.addCheckbox(b,mxResources.get("dark"),!0),g+=26);var F=this.addCheckbox(b,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight=
-"8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");l&&(b.appendChild(I),mxUtils.write(b,mxResources.get("crop")),mxUtils.br(b),g+=26,mxEvent.addListener(F,"change",function(){F.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));e.isSelectionEmpty()||(I.setAttribute("checked","checked"),I.defaultChecked=!0);var J=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible),u=document.createElement("input");u.style.marginTop=
-"16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||u.setAttribute("disabled","disabled");c&&(b.appendChild(u),mxUtils.write(b,mxResources.get("embedImages")),mxUtils.br(b),g+=26);var K=null;if("png"==n||"jpeg"==n)K=this.addCheckbox(b,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var B=this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=n),L=null!=this.pages&&1<this.pages.length,
-O=this.addCheckbox(b,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=n);O.style.marginLeft="24px";O.style.marginBottom="16px";L?g+=26:O.style.display="none";mxEvent.addListener(B,"change",function(){B.checked&&L?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});k&&L||O.setAttribute("disabled","disabled");var H=document.createElement("select");H.style.maxWidth="260px";H.style.marginLeft="8px";H.style.marginRight="10px";H.className="geBtn";a=document.createElement("option");a.setAttribute("value",
-"auto");mxUtils.write(a,mxResources.get("automatic"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));H.appendChild(a);"svg"==n&&(mxUtils.write(b,mxResources.get("links")+":"),b.appendChild(H),mxUtils.br(b),mxUtils.br(b),g+=26);d=new CustomDialog(this,b,mxUtils.bind(this,function(){this.lastExportBorder=
-q.value;this.lastExportZoom=t.value;m(t.value,v.checked,!F.checked,J.checked,B.checked,u.checked,q.value,I.checked,!O.checked,H.value,null!=K?K.checked:null,null!=G?G.checked:null)}),null,d,f);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,c,d,f,m){var b=document.createElement("div");b.style.whiteSpace=
-"nowrap";var e=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";b.appendChild(g)}var p=this.addCheckbox(b,mxResources.get("fit"),!0),k=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible&&f,!f),n=this.addCheckbox(b,d),q=this.addCheckbox(b,mxResources.get("lightbox"),!0),C=this.addEditButton(b,q),z=C.getEditInput(),E=1<e.model.getChildCount(e.model.getRoot()),G=this.addCheckbox(b,
-mxResources.get("layers"),E,!E);G.style.marginLeft=z.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&G.removeAttribute("disabled"),z.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"));z.checked&&q.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,b,mxUtils.bind(this,function(){a(p.checked,
-k.checked,n.checked,q.checked,C.getLink(),G.checked)}),null,mxResources.get("embed"),m);this.showDialog(c.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,c,d,f,m,l,k,n){function b(b){var c=" ",g="";f&&(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('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(m?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var p="";d&&(p=' width="'+Math.round(e.width)+'" height="'+Math.round(e.height)+'"');k('<img src="'+b+'"'+p+(""!=g?' style="'+g+'"':"")+c+"/>")}var e=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var c=f?this.getFileData(!0):null;a=this.createImageDataUri(a,c,"png");b(a)}),null,
-null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,c);else if(c=this.getFileData(!0),e.width*e.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*e.width)+"&h="+Math.round(2*e.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+g+"&xml="+encodeURIComponent(c));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?b("data:image/png;base64,"+p.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,c,d,f,m,l,k){var b=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),e=b.getElementsByTagName("a");if(null!=e)for(var g=0;g<e.length;g++){var p=e[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==e[g].getAttribute("target")&&e[g].removeAttribute("target")}f&&b.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(b);if(d){var n=" ",q="";f&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(m?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.editor.convertImages(b,mxUtils.bind(this,function(a){k('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",f&&(b.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(m?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(b.getAttribute("width")),c=parseInt(b.getAttribute("height")),b.setAttribute("viewBox","-0.5 -0.5 "+a+" "+c),q+="max-width:100%;max-height:"+c+"px;",b.removeAttribute("height")),""!=q&&b.setAttribute("style",q),this.editor.addFontCss(b),this.editor.graph.mathEnabled&&this.editor.addMathCss(b),k(mxUtils.getXml(b))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+function(a,c,d,f,n,l,k){k=null!=k?k:[];f&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=c&&c!=mxConstants.NONE&&k.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=n&&0<n.length&&k.push("edit="+encodeURIComponent(n)),l&&k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&k.push("page-id="+this.currentPage.getId());return k};EditorUi.prototype.createLink=function(a,c,d,f,n,l,k,m,
+y){y=null!=y?y:this.createUrlParameters(a,c,d,!1,n,l);a=this.getCurrentFile();c=!0;null!=k?d="#U"+encodeURIComponent(k):(a=this.getCurrentFile(),m||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),c=!1));c&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(a.getTitle()));return(f?EditorUi.lightboxHost:
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,c,d,f,n,l,k,m,y,v,q){this.getBasenames();var b={};""!=n&&n!=mxConstants.NONE&&(b.highlight=n);"auto"!==f&&(b.target=f);y||(b.lightbox=!1);b.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(b.zoom=d/100);d=[];k&&(d.push("pages"),b.resize=!0,null!=this.pages&&
+null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),b.resize=!0);m&&d.push("layers");0<d.length&&(y&&d.push("lightbox"),b.toolbar=d.join(" "));null!=v&&0<v.length&&(b.edit=v);null!=a?b.url=a:b.xml=this.getFileData(!0,null,null,null,null,!k);c='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";
+q(c,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,c,d,f){var b=document.createElement("div");b.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";b.appendChild(e);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");e=k.cloneNode(!0);e.setAttribute("value","copy");g.appendChild(e);
+var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(p);mxUtils.br(g);g.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));g.appendChild(p);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.style.cursor="pointer",mxUtils.write(p,mxResources.get("share")),g.appendChild(p),mxEvent.addListener(p,
+"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));e.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");b.appendChild(g);var q=this.addLinkSection(b),z=this.addCheckbox(b,mxResources.get("zoom"),!0,null,!0);mxUtils.write(b,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";b.appendChild(C);
+var A=this.addCheckbox(b,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(b,mxResources.get("allPages"),g,!g),G=this.addCheckbox(b,mxResources.get("layers"),!0),F=this.addCheckbox(b,mxResources.get("lightbox"),!0),I=this.addEditButton(b,F),J=I.getEditInput();J.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):
+I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,b,mxUtils.bind(this,function(){f(k.checked?d:null,z.checked,C.value,q.getTarget(),q.getColor(),A.checked,E.checked,G.checked,F.checked,I.getLink())}),null,a,c);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,c,d,f,n,l,k){k=document.createElement("div");k.style.whiteSpace="nowrap";var b=document.createElement("h3");mxUtils.write(b,a||mxResources.get("link"));b.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(b);var e=this.getCurrentFile(),b="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=e&&e.constructor==window.DriveFile&&!c){a=80;var b="https://desk.draw.io/support/solutions/articles/16000039384",g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace=
+"normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));g.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(e.getId())}));p.style.marginTop="12px";p.className="geBtn";g.appendChild(p);k.appendChild(g);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));g.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,
+function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,q=null;if(null!=d||null!=f)a+=30,mxUtils.write(k,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight=
+"16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",k.appendChild(m),mxUtils.write(k,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=f+"px",k.appendChild(q),mxUtils.br(k);var x=this.addLinkSection(k,l);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==e||e.constructor!=window.DriveFile||c)E=
+this.addCheckbox(k,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(k,mxResources.get("lightbox"),!0,null,null,!l),F=this.addEditButton(k,G),I=F.getEditInput();l&&(I.style.marginLeft=G.style.marginLeft,G.style.display="none",a-=30);var J=this.addCheckbox(k,mxResources.get("layers"),!0);J.style.marginLeft=I.style.marginLeft;J.style.marginBottom="16px";J.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(J.removeAttribute("disabled"),I.removeAttribute("disabled")):(J.setAttribute("disabled",
+"disabled"),I.setAttribute("disabled","disabled"));I.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,k,mxUtils.bind(this,function(){n(x.getTarget(),x.getColor(),null==E?!0:E.checked,G.checked,F.getLink(),J.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),b);this.showDialog(c.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,c,d,f,n){var b=document.createElement("div");b.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:"+(n?"10":"4")+"px";b.appendChild(e);if(n){mxUtils.write(b,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
+"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";b.appendChild(g);mxUtils.write(b,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";b.appendChild(k);mxUtils.br(b)}var p=this.addCheckbox(b,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
+m=f?null:this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,q=f?null:this.addCheckbox(b,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=q&&(q.style.marginBottom="16px");a=new CustomDialog(this,b,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;d(!p.checked,null!=m?m.checked:!1,null!=q?q.checked:!1,a,b)}),null,a,c);this.showDialog(a.container,300,(n?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(a,c,d,f,n,l,k,m){k=null!=k?k:!0;var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=this.editor.graph,g="jpeg"==m?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";b.appendChild(p);mxUtils.write(b,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
+"12px";t.value=this.lastExportZoom||"100%";b.appendChild(t);mxUtils.write(b,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";b.appendChild(q);mxUtils.br(b);var x=this.addCheckbox(b,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),G=null;"dark"==uiTheme&&(G=this.addCheckbox(b,mxResources.get("dark"),!0),g+=26);var F=this.addCheckbox(b,
+mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");l&&(b.appendChild(I),mxUtils.write(b,mxResources.get("crop")),mxUtils.br(b),g+=26,mxEvent.addListener(F,"change",function(){F.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));e.isSelectionEmpty()||(I.setAttribute("checked","checked"),
+I.defaultChecked=!0);var J=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||u.setAttribute("disabled","disabled");c&&(b.appendChild(u),mxUtils.write(b,mxResources.get("embedImages")),mxUtils.br(b),g+=26);var K=null;if("png"==m||"jpeg"==m)K=this.addCheckbox(b,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
+!0),g+=26;var B=this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),L=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(b,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=m);O.style.marginLeft="24px";O.style.marginBottom="16px";L?g+=26:O.style.display="none";mxEvent.addListener(B,"change",function(){B.checked&&L?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});k&&L||O.setAttribute("disabled","disabled");var H=document.createElement("select");
+H.style.maxWidth="260px";H.style.marginLeft="8px";H.style.marginRight="10px";H.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));H.appendChild(a);"svg"==
+m&&(mxUtils.write(b,mxResources.get("links")+":"),b.appendChild(H),mxUtils.br(b),mxUtils.br(b),g+=26);d=new CustomDialog(this,b,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;n(t.value,x.checked,!F.checked,J.checked,B.checked,u.checked,q.value,I.checked,!O.checked,H.value,null!=K?K.checked:null,null!=G?G.checked:null)}),null,d,f);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,c,d,f,n){var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=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";b.appendChild(g)}var k=this.addCheckbox(b,mxResources.get("fit"),!0),p=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible&&f,
+!f),m=this.addCheckbox(b,d),q=this.addCheckbox(b,mxResources.get("lightbox"),!0),C=this.addEditButton(b,q),A=C.getEditInput(),E=1<e.model.getChildCount(e.model.getRoot()),G=this.addCheckbox(b,mxResources.get("layers"),E,!E);G.style.marginLeft=A.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&G.removeAttribute("disabled"),A.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));
+A.checked&&q.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,b,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,q.checked,C.getLink(),G.checked)}),null,mxResources.get("embed"),n);this.showDialog(c.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,c,d,f,n,l,k,m){function b(b){var c=" ",g="";f&&(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('"+
+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var p="";d&&(p=' width="'+Math.round(e.width)+'" height="'+Math.round(e.height)+'"');k('<img src="'+b+'"'+p+(""!=g?' style="'+g+'"':"")+c+"/>")}var e=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var c=f?this.getFileData(!0):null;a=this.createImageDataUri(a,c,"png");b(a)}),null,null,null,
+mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),e.width*e.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*e.width)+"&h="+Math.round(2*e.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+g+"&xml="+encodeURIComponent(c));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?b("data:image/png;base64,"+
+p.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,c,d,f,n,l,k){var b=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),e=b.getElementsByTagName("a");if(null!=e)for(var g=0;g<e.length;g++){var p=e[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==e[g].getAttribute("target")&&e[g].removeAttribute("target")}f&&b.setAttribute("content",this.getFileData(!0));
+c&&this.editor.graph.addSvgShadow(b);if(d){var m=" ",q="";f&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&
+(q+="max-width:100%;");this.editor.convertImages(b,mxUtils.bind(this,function(a){k('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+m+"/>")}))}else q="",f&&(b.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(b.getAttribute("width")),c=parseInt(b.getAttribute("height")),b.setAttribute("viewBox","-0.5 -0.5 "+a+" "+c),q+="max-width:100%;max-height:"+c+"px;",b.removeAttribute("height")),""!=q&&b.setAttribute("style",q),this.editor.addFontCss(b),this.editor.graph.mathEnabled&&this.editor.addMathCss(b),k(mxUtils.getXml(b))};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.decodeNodeIntoGraph=function(a,c){if(null!=a){var b=null;if("diagram"==a.nodeName)b=a;else if("mxfile"==
a.nodeName){var e=a.getElementsByTagName("diagram");if(0<e.length){var b=e[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&&(a=Editor.parseDiagramNode(b))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(a)}catch(l){}finally{this.editor.graph=e}return a};EditorUi.prototype.getPngFileProperties=function(a){var b=1,c=0;if(null!=a){if(a.hasAttribute("scale")){var d=
-parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(b=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(c=d))}return{scale:b,border:c}};EditorUi.prototype.getEmbeddedPng=function(a,c,d,f,m){try{var b=this.editor.graph,e=null!=b.themes&&"darkTheme"==b.defaultThemeName,g=null;if(null!=d&&0<d.length)b=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(b.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
+parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(b=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(c=d))}return{scale:b,border:c}};EditorUi.prototype.getEmbeddedPng=function(a,c,d,f,n){try{var b=this.editor.graph,e=null!=b.themes&&"darkTheme"==b.defaultThemeName,g=null;if(null!=d&&0<d.length)b=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(b.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
!0),b),g=d;else if(e||null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),k=b.getGlobalVariable,p=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:k.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var d=e.toDataURL("image/png"),d=Editor.writeGraphModelToPng(d,
-"tEXt","mxfile",encodeURIComponent(g));a(d.substring(d.lastIndexOf(",")+1));b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}catch(C){null!=c&&c(C)}}),null,null,null,mxUtils.bind(this,function(a){null!=c&&c(a)}),null,null,f,null,b.shadowVisible,null,b,m)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,c,d,f,m,l,k,n){n=null!=n?n:!0;k=c.background;k==mxConstants.NONE&&(k=null);l=c.getSvg(k,null,null,null,null,l);c.shadowVisible&&c.addSvgShadow(l);null!=a&&
-l.setAttribute("content",a);null!=d&&l.setAttribute("resource",d);if(null!=m)this.embedFonts(l,mxUtils.bind(this,function(a){n?this.editor.convertImages(a,mxUtils.bind(this,function(a){m((f?"":'<?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))})):m((f?"":'<?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')+
+"tEXt","mxfile",encodeURIComponent(g));a(d.substring(d.lastIndexOf(",")+1));b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}catch(C){null!=c&&c(C)}}),null,null,null,mxUtils.bind(this,function(a){null!=c&&c(a)}),null,null,f,null,b.shadowVisible,null,b,n)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,c,d,f,n,l,k,m){m=null!=m?m:!0;k=c.background;k==mxConstants.NONE&&(k=null);l=c.getSvg(k,null,null,null,null,l);c.shadowVisible&&c.addSvgShadow(l);null!=a&&
+l.setAttribute("content",a);null!=d&&l.setAttribute("resource",d);if(null!=n)this.embedFonts(l,mxUtils.bind(this,function(a){m?this.editor.convertImages(a,mxUtils.bind(this,function(a){n((f?"":'<?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))})):n((f?"":'<?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(f?"":'<?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(l)};EditorUi.prototype.embedFonts=function(a,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.editor.addFontCss(a,b),c(a)}catch(p){c(a)}}))}catch(g){c(a)}}))};
-EditorUi.prototype.exportImage=function(a,c,d,f,m,l,k,n,q,x,D,A){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,m?this.getFileData(!0,null,null,null,d,n):null,q,null==this.pages||0==this.pages.length,D)}catch(E){"Invalid image"==E.message?this.downloadFile(q):
-this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,c,f,null,null,l,k,x,A)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,c,d,f,m){c=null!=c?c:0;d=null!=d?d:0;var b=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
-var k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var g=[],n=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),f=!1,n=1);for(;n<p.length;n++){var q=
-p[n].getAttribute("id");p[n].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(p[n]));a[q]=p[n].getAttribute("id");var z=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[z+1]));e.model.execute(new ChangePage(this,C,C,z,!0));g.push(C)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(b=e.importGraphModel(k,c,d,f),null!=b))for(n=0;n<b.length;n++)this.updatePageLinksForCell(a,b[n])}finally{e.model.endUpdate()}}}catch(E){if(m)throw E;this.handleError(E)}return b};
-EditorUi.prototype.updatePageLinks=function(a,c){for(var b=0;b<c.length;b++)this.updatePageLinksForCell(a,c[b].root)};EditorUi.prototype.updatePageLinksForCell=function(a,c){var b=document.createElement("div"),e=this.editor.graph,d=e.getLinkForCell(c);null!=d&&e.setLinkForCell(c,this.updatePageLink(a,d));if(e.isHtmlLabel(c)){b.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var f=b.getElementsByTagName("a"),k=!1,n=0;n<f.length;n++)d=f[n].getAttribute("href"),null!=d&&(f[n].setAttribute("href",this.updatePageLink(a,
-d)),k=!0);k&&e.labelChanged(c,b.innerHTML)}for(n=0;n<e.model.getChildCount(c);n++)this.updatePageLinksForCell(a,e.model.getChildAt(c,n))};EditorUi.prototype.updatePageLink=function(a,c){if("data:page/id,"==c.substring(0,13)){var b=a[c.substring(c.indexOf(",")+1)];c=null!=b?"data:page/id,"+b:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var d=0;d<e.actions.length;d++){var f=e.actions[d];null!=f.open&&"data:page/id,"==f.open.substring(0,
-13)&&(b=a[f.open.substring(f.open.indexOf(",")+1)],null!=b?f.open="data:page/id,"+b:delete f.open)}c="data:action/json,"+JSON.stringify(e)}}catch(v){}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,c,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var b=this.isRemoteVisioFormat(f);
-try{var e="UNKNOWN-VISIO",g=f.lastIndexOf(".");if(0<=g&&g<f.length)e=f.substring(g+1).toUpperCase();else{var m=f.lastIndexOf("/");0<=m&&m<f.length&&(f=f.substring(m+1))}EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:b?"remote":"local"})}catch(D){}if(b)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{b=new FormData;b.append("file1",a,f);var k=new XMLHttpRequest;
-k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var b=new FileReader;b.onload=mxUtils.bind(this,function(a){try{c(a.target.result)}catch(z){d({message:mxResources.get("errorLoadingFile")})}});b.readAsText(a)}else this.doImportVisio(a,c,d,f)}catch(C){d(C)}else d({})});k.send(b)}else try{this.doImportVisio(a,c,d,f)}catch(D){d(D)}}else this.spinner.stop(),
-this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?b():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.importGraphML=function(a,c,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,c,d)}catch(m){d(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
+EditorUi.prototype.exportImage=function(a,c,d,f,n,l,k,m,q,v,D,z){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,n?this.getFileData(!0,null,null,null,d,m):null,q,null==this.pages||0==this.pages.length,D)}catch(E){"Invalid image"==E.message?this.downloadFile(q):
+this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,c,f,null,null,l,k,v,z)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,c,d,f,n){c=null!=c?c:0;d=null!=d?d:0;var b=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
+var k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var g=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),f=!1,m=1);for(;m<p.length;m++){var q=
+p[m].getAttribute("id");p[m].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(p[m]));a[q]=p[m].getAttribute("id");var A=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[A+1]));e.model.execute(new ChangePage(this,C,C,A,!0));g.push(C)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(b=e.importGraphModel(k,c,d,f),null!=b))for(m=0;m<b.length;m++)this.updatePageLinksForCell(a,b[m])}finally{e.model.endUpdate()}}}catch(E){if(n)throw E;this.handleError(E)}return b};
+EditorUi.prototype.updatePageLinks=function(a,c){for(var b=0;b<c.length;b++)this.updatePageLinksForCell(a,c[b].root)};EditorUi.prototype.updatePageLinksForCell=function(a,c){var b=document.createElement("div"),e=this.editor.graph,d=e.getLinkForCell(c);null!=d&&e.setLinkForCell(c,this.updatePageLink(a,d));if(e.isHtmlLabel(c)){b.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var f=b.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)d=f[m].getAttribute("href"),null!=d&&(f[m].setAttribute("href",this.updatePageLink(a,
+d)),k=!0);k&&e.labelChanged(c,b.innerHTML)}for(m=0;m<e.model.getChildCount(c);m++)this.updatePageLinksForCell(a,e.model.getChildAt(c,m))};EditorUi.prototype.updatePageLink=function(a,c){if("data:page/id,"==c.substring(0,13)){var b=a[c.substring(c.indexOf(",")+1)];c=null!=b?"data:page/id,"+b:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var d=0;d<e.actions.length;d++){var f=e.actions[d];null!=f.open&&"data:page/id,"==f.open.substring(0,
+13)&&(b=a[f.open.substring(f.open.indexOf(",")+1)],null!=b?f.open="data:page/id,"+b:delete f.open)}c="data:action/json,"+JSON.stringify(e)}}catch(x){}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,c,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var b=this.isRemoteVisioFormat(f);
+try{var e="UNKNOWN-VISIO",g=f.lastIndexOf(".");if(0<=g&&g<f.length)e=f.substring(g+1).toUpperCase();else{var n=f.lastIndexOf("/");0<=n&&n<f.length&&(f=f.substring(n+1))}EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:b?"remote":"local"})}catch(D){}if(b)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{b=new FormData;b.append("file1",a,f);var k=new XMLHttpRequest;
+k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var b=new FileReader;b.onload=mxUtils.bind(this,function(a){try{c(a.target.result)}catch(A){d({message:mxResources.get("errorLoadingFile")})}});b.readAsText(a)}else this.doImportVisio(a,c,d,f)}catch(C){d(C)}else d({})});k.send(b)}else try{this.doImportVisio(a,c,d,f)}catch(D){d(D)}}else this.spinner.stop(),
+this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?b():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.importGraphML=function(a,c,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,c,d)}catch(n){d(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?b():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(e){this.handleError(e)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,c,d){var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(m){}try{c(LucidImporter.importState(JSON.parse(a)))}catch(m){null!=window.console&&
-console.error(m),d(m)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(b,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",b):mxscript("js/extensions.min.js",b))};EditorUi.prototype.generateMermaidImage=function(a,c,d,f){var b=this,e=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=
+"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,c,d){var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(n){}try{c(LucidImporter.importState(JSON.parse(a)))}catch(n){null!=window.console&&
+console.error(n),d(n)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(b,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",b):mxscript("js/extensions.min.js",b))};EditorUi.prototype.generateMermaidImage=function(a,c,d,f){var b=this,e=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=
!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<c.length){var e=parseFloat(c[0].getAttribute("width")),g=parseFloat(c[0].getAttribute("height"));d(b.convertDataUri(Editor.createSvgDataUri(a)),e,
-g)}else f({message:mxResources.get("invalidInput")})}catch(D){f(D)}})}catch(v){f(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?e():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generatePlantUmlImage=function(a,c,d,f){function b(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+
+g)}else f({message:mxResources.get("invalidInput")})}catch(D){f(D)}})}catch(x){f(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?e():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generatePlantUmlImage=function(a,c,d,f){function b(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+
a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+b(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+b(a.charCodeAt(i),0,0):r+b(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=c&&(g.responseType=
-"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==c)d(this.response);else{var b=new FileReader;b.readAsDataURL(this.response);b.onloadend=function(a){var c=new Image;c.onload=function(){try{var a=c.width,e=c.height;if(0==a&&0==e){var g=b.result,l=g.indexOf(","),m=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(m).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),e=parseFloat(k[0].getAttribute("height")))}d(b.result,a,
-e)}catch(I){f(I)}};c.src=b.result};b.onerror=function(a){f(a)}}else f(a)};g.onerror=function(a){f(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,c,d){var b=this.editor.graph,e=null;b.getModel().beginUpdate();try{e=b.insertVertex(null,null,"<pre>"+a+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),b.updateCellSize(e,!0)}finally{b.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,c,d,f,m,l,k){l=null!=l?l:!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,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var b=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var e=
+"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==c)d(this.response);else{var b=new FileReader;b.readAsDataURL(this.response);b.onloadend=function(a){var c=new Image;c.onload=function(){try{var a=c.width,e=c.height;if(0==a&&0==e){var g=b.result,l=g.indexOf(","),n=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(n).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),e=parseFloat(k[0].getAttribute("height")))}d(b.result,a,
+e)}catch(I){f(I)}};c.src=b.result};b.onerror=function(a){f(a)}}else f(a)};g.onerror=function(a){f(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,c,d){var b=this.editor.graph,e=null;b.getModel().beginUpdate();try{e=b.insertVertex(null,null,"<pre>"+a+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),b.updateCellSize(e,!0)}finally{b.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,c,d,f,n,l,k){l=null!=l?l:!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,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var b=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var e=
Editor.extractGraphModelFromPdf(a);if(null!=e&&0<e.length)return this.importXml(e,c,d,l,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(e=this.extractGraphModelFromPng(a),null!=e&&0<e.length))return this.importXml(e,c,d,l,!0);if("data:image/svg+xml;"==a.substring(0,19))try{e=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(e=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0)):e=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(e,
-c,d,l,!0);if(0<g.length)return g}catch(A){}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){b.setSelectionCell(b.insertVertex(null,null,"",b.snap(c),b.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
+c,d,l,!0);if(0<g.length)return g}catch(z){}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){b.setSelectionCell(b.insertVertex(null,null,"",b.snap(c),b.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
g=Math.round(e.width*f);e=Math.round(e.height*f);b.setSelectionCell(b.insertVertex(null,null,"",b.snap(c),b.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;b.getModel().beginUpdate();try{e=b.insertVertex(b.getDefaultParent(),null,a,b.snap(c),b.snap(d),1,1,"text;"+(f?"html=1;":"")),b.updateCellSize(e),b.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{b.getModel().endUpdate()}b.setSelectionCell(e)}))}else{a=
Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,c,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,d,l));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
-mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{b=this.editor.graph;m=null;b.getModel().beginUpdate();try{m=b.insertVertex(b.getDefaultParent(),null,"",b.snap(c),b.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));b.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
-a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");m.value=a;b.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var p=b.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=p.width;m.geometry.height=p.height}Graph.isLink(m.value)&&b.setLinkForCell(m,m.value);m.geometry.width+=b.gridSize;m.geometry.height+=b.gridSize}finally{b.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<
+mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{b=this.editor.graph;n=null;b.getModel().beginUpdate();try{n=b.insertVertex(b.getDefaultParent(),null,"",b.snap(c),b.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));b.fireEvent(new mxEventObject("textInserted","cells",[n]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
+a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");n.value=a;b.updateCellSize(n);if(0<this.maxTextWidth&&n.geometry.width>this.maxTextWidth){var m=b.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=m.width;n.geometry.height=m.height}Graph.isLink(n.value)&&b.setLinkForCell(n,n.value);n.geometry.width+=b.gridSize;n.geometry.height+=b.gridSize}finally{b.getModel().endUpdate()}return[n]}}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,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,
14))};EditorUi.prototype.importLocalFile=function(a,c){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){null!=b.files&&(this.importFiles(b.files,null,null,this.maxImageSize),b.type="",b.type="file",b.value="")}));b.style.display="none";document.body.appendChild(b);this.importFileInputElt=b}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";
if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,
360,220,!0,!0,function(){window.openFile=null});if(!c){var d=this.dialog,f=d.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;f.apply(d,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,c,d){var b=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)d();else{var f=0,g,l=!1;e.forEach(function(a,
b){var e=b.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,b.async("string").then(function(a){0==a.indexOf("<mxfile ")?c(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=b))});0<f?g.async("string").then(function(e){!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(e,a.name)?b.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?c(a.responseText):d())}),a.name):d()}):l||d()}},
-function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,c,d,f,m,l,k,n,q,x,D){x=null!=x?x:!0;var b=!1,e=null,g=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,d,f,x);null!=n&&n(b)});"image"==c.substring(0,5)?(q=!1,"image/png"==c.substring(0,9)&&(c=D?null:
-this.extractGraphModelFromPng(a),null!=c&&0<c.length&&(e=this.importXml(c,d,f,x),q=!0)),q||(c=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),x&&c.isGridEnabled()&&(d=c.snap(d),f=c.snap(f)),e=[c.insertVertex(null,null,"",d,f,m,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(b=!0,this.importGraphML(a,g)):null!=q&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||
-/(\.vs(x|sx?))($|\?)/i.test(k))?(b=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(b=!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!=n&&n(null))}),k)):0==a.indexOf("PK")&&null!=q?(b=!0,this.importZipFile(q,g,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x);n(e)}))):/(\.v(sd|dx))($|\?)/i.test(k)||
-/(\.vs(s|x))($|\?)/i.test(k)||(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x));b||null==n||n(e);return e};EditorUi.prototype.importFiles=function(a,c,d,f,m,l,k,n,q,x,D,A){f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var b=null!=c&&null!=d,e=!0;c=null!=c?c:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=D||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>p){g=!0;break}var y=mxUtils.bind(this,function(){var g=
-this.editor.graph,p=g.gridSize;m=null!=m?m:mxUtils.bind(this,function(a,c,e,d,f,g,l,m,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,c,e,d,f,g,l,m,k,b,A)}catch(U){return this.handleError(U),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,y=[],v=mxUtils.bind(this,function(a,b){y[a]=b;if(0==
---q){this.spinner.stop();if(null!=n)n(y);else{var c=[];g.getModel().beginUpdate();try{for(var e=0;e<y.length;e++){var d=y[e]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}l(c)}}),z=0;z<t;z++)mxUtils.bind(this,function(b){var l=a[b];if(null!=l){var n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var n=a.target.result,t=n.indexOf(","),q=decodeURIComponent(escape(atob(n.substring(t+1)))),
-y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=A?null:q.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)?v(b,mxUtils.bind(this,function(){try{if(n.substring(0,t+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var e=a[0],k=e.getAttribute("width"),q=
-e.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,x=e.getAttribute("viewBox");if(null==x||0==x.length)e.setAttribute("viewBox","0 0 "+k+" "+q);else if(isNaN(k)||isNaN(q)){var v=x.split(" ");3<v.length&&(k=parseFloat(v[2]),q=parseFloat(v[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(e));var u=Math.min(1,Math.min(f/Math.max(1,k)),f/Math.max(1,q)),B=m(n,l.type,c+b*p,d+b*p,Math.max(1,Math.round(k*u)),Math.max(1,Math.round(q*
-u)),l.name);if(isNaN(k)||isNaN(q)){var z=new Image;z.onload=mxUtils.bind(this,function(){k=Math.max(1,z.width);q=Math.max(1,z.height);B[0].geometry.width=k;B[0].geometry.height=q;e.setAttribute("viewBox","0 0 "+k+" "+q);n=Editor.createSvgDataUri(mxUtils.getXml(e));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));g.setCellStyles("image",n,[B[0]])});z.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return B}}}catch(W){}return null})):v(b,mxUtils.bind(this,function(){return m(u,
-"text/xml",c+b*p,d+b*p,0,0,l.name)}))}else v(b,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==l.type){var B=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var z=new Image;z.src=a.target.result;v(b,mxUtils.bind(this,function(){return m(B,"text/xml",c+b*p,d+b*p,z.width,z.height,l.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(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,n){v(b,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var t=e&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(f/k,f/n)):1;return m(g,l.type,c+b*p,d+b*p,Math.round(k*t),Math.round(n*t),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),e,f,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n=a.target.result,m(n,l.type,c+b*p,d+b*p,240,160,l.name,function(a){v(b,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?m(null,l.type,c+b*p,d+b*p,240,160,l.name,function(a){v(b,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?n.readAsDataURL(l):n.readAsText(l)}})(z)});if(g){g=[];
+function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,c,d,f,n,l,k,m,q,v,D){v=null!=v?v:!0;var b=!1,e=null,g=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,d,f,v);null!=m&&m(b)});"image"==c.substring(0,5)?(q=!1,"image/png"==c.substring(0,9)&&(c=D?null:
+this.extractGraphModelFromPng(a),null!=c&&0<c.length&&(e=this.importXml(c,d,f,v),q=!0)),q||(c=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),v&&c.isGridEnabled()&&(d=c.snap(d),f=c.snap(f)),e=[c.insertVertex(null,null,"",d,f,n,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(b=!0,this.importGraphML(a,g)):null!=q&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||
+/(\.vs(x|sx?))($|\?)/i.test(k))?(b=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(b=!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!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=q?(b=!0,this.importZipFile(q,g,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,v);m(e)}))):/(\.v(sd|dx))($|\?)/i.test(k)||
+/(\.vs(s|x))($|\?)/i.test(k)||(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,v));b||null==m||m(e);return e};EditorUi.prototype.importFiles=function(a,c,d,f,n,l,k,m,q,v,D,z){f=null!=f?f:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var b=null!=c&&null!=d,e=!0;c=null!=c?c:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=D||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>p){g=!0;break}var y=mxUtils.bind(this,function(){var g=
+this.editor.graph,p=g.gridSize;n=null!=n?n:mxUtils.bind(this,function(a,c,e,d,f,g,l,n,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,c,e,d,f,g,l,n,k,b,z)}catch(U){return this.handleError(U),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,y=[],x=mxUtils.bind(this,function(a,b){y[a]=b;if(0==
+--q){this.spinner.stop();if(null!=m)m(y);else{var c=[];g.getModel().beginUpdate();try{for(var e=0;e<y.length;e++){var d=y[e]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}l(c)}}),A=0;A<t;A++)mxUtils.bind(this,function(b){var l=a[b];if(null!=l){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),q=decodeURIComponent(escape(atob(m.substring(t+1)))),
+y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=z?null:q.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)?x(b,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var e=a[0],k=e.getAttribute("width"),q=
+e.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,v=e.getAttribute("viewBox");if(null==v||0==v.length)e.setAttribute("viewBox","0 0 "+k+" "+q);else if(isNaN(k)||isNaN(q)){var u=v.split(" ");3<u.length&&(k=parseFloat(u[2]),q=parseFloat(u[3]))}m=Editor.createSvgDataUri(mxUtils.getXml(e));var x=Math.min(1,Math.min(f/Math.max(1,k)),f/Math.max(1,q)),B=n(m,l.type,c+b*p,d+b*p,Math.max(1,Math.round(k*x)),Math.max(1,Math.round(q*
+x)),l.name);if(isNaN(k)||isNaN(q)){var A=new Image;A.onload=mxUtils.bind(this,function(){k=Math.max(1,A.width);q=Math.max(1,A.height);B[0].geometry.width=k;B[0].geometry.height=q;e.setAttribute("viewBox","0 0 "+k+" "+q);m=Editor.createSvgDataUri(mxUtils.getXml(e));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[B[0]])});A.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return B}}}catch(W){}return null})):x(b,mxUtils.bind(this,function(){return n(u,
+"text/xml",c+b*p,d+b*p,0,0,l.name)}))}else x(b,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==l.type){var B=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var A=new Image;A.src=a.target.result;x(b,mxUtils.bind(this,function(){return n(B,"text/xml",c+b*p,d+b*p,A.width,A.height,l.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(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,m){x(b,mxUtils.bind(this,function(){if(null!=g&&g.length<v){var t=e&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(f/k,f/m)):1;return n(g,l.type,c+b*p,d+b*p,Math.round(k*t),Math.round(m*t),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),e,f,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,n(m,l.type,c+b*p,d+b*p,240,160,l.name,function(a){x(b,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?n(null,l.type,c+b*p,d+b*p,240,160,l.name,function(a){x(b,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?m.readAsDataURL(l):m.readAsText(l)}})(A)});if(g){g=[];
for(t=0;t<a.length;t++)g.push(a[t]);a=g;this.confirmImageResize(function(a){e=a;y()},q)}else y()};EditorUi.prototype.confirmImageResize=function(a,c){c=null!=c?c:!1;var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(e,d){if(e||c)mxSettings.setResizeImages(e?d:null),mxSettings.save();b();a(d)};null==e||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,e)};EditorUi.prototype.parseFile=function(a,c,d){d=null!=d?d:a.name;var b=new FormData;b.append("format","xml");b.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(b);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a,c){c=null!=c?c:this.resampleThreshold;return a.length>c};EditorUi.prototype.resizeImage=function(a,c,d,f,m,l){m=null!=m?m:this.maxImageSize;var b=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImage(c,l))try{var g=Math.max(b/m,e/m);if(1<g){var k=Math.round(b/g),n=Math.round(e/g),p=document.createElement("canvas");
-p.width=k;p.height=n;p.getContext("2d").drawImage(a,0,0,k,n);var q=p.toDataURL();if(q.length<c.length){var z=document.createElement("canvas");z.width=k;z.height=n;var E=z.toDataURL();q!==E&&(c=q,b=k,e=n)}}}catch(G){}d(c,b,e)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,c,d){try{var b=new Image;b.onload=function(){b.width=0<b.width?b.width:120;b.height=0<b.height?b.height:120;c(b)};null!=d&&(b.onerror=d);
-b.src=a}catch(m){if(null!=d)d(m);else throw m;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph;"dark"==uiTheme&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("plantUml")+
-":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(e,f.format,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(b,"<pre>"+d+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(d),[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=g,m.height=l,c.cellsResized([b],[m],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:e,format:f.format}))}finally{c.getModel().endUpdate()}},
-function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(e,f.config,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",d,[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=Math.max(m.width,
-g),m.height=Math.max(m.height,l),c.cellsResized([b],[m],!1));c.setAttributeForCell(b,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};var f=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,e){try{var d=this.graph.getAttributeForCell(b,"plantUmlData");if(null!=d)this.editPlantUmlData(b,e,d);else if(d=this.graph.getAttributeForCell(b,"mermaidData"),
+OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(b);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a,c){c=null!=c?c:this.resampleThreshold;return a.length>c};EditorUi.prototype.resizeImage=function(a,c,d,f,n,l){n=null!=n?n:this.maxImageSize;var b=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImage(c,l))try{var g=Math.max(b/n,e/n);if(1<g){var k=Math.round(b/g),m=Math.round(e/g),p=document.createElement("canvas");
+p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var q=p.toDataURL();if(q.length<c.length){var A=document.createElement("canvas");A.width=k;A.height=m;var E=A.toDataURL();q!==E&&(c=q,b=k,e=m)}}}catch(G){}d(c,b,e)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,c,d){try{var b=new Image;b.onload=function(){b.width=0<b.width?b.width:120;b.height=0<b.height?b.height:120;c(b)};null!=d&&(b.onerror=d);
+b.src=a}catch(n){if(null!=d)d(n);else throw n;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph;"dark"==uiTheme&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("plantUml")+
+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(e,f.format,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(b,"<pre>"+d+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(d),[b]);var k=c.model.getGeometry(b);null!=k&&(k=k.clone(),k.width=g,k.height=l,c.cellsResized([b],[k],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:e,format:f.format}))}finally{c.getModel().endUpdate()}},
+function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(e,f.config,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",d,[b]);var k=c.model.getGeometry(b);null!=k&&(k=k.clone(),k.width=Math.max(k.width,
+g),k.height=Math.max(k.height,l),c.cellsResized([b],[k],!1));c.setAttributeForCell(b,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};var f=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,e){try{var d=this.graph.getAttributeForCell(b,"plantUmlData");if(null!=d)this.editPlantUmlData(b,e,d);else if(d=this.graph.getAttributeForCell(b,"mermaidData"),
null!=d)this.editMermaidData(b,e,d);else{var g=c.getCellStyle(b);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(b):f.apply(this,arguments)}}catch(F){a.handleError(F)}};c.getLinkTitle=function(b){return a.getLinkTitle(b)};c.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(E){a.handleError(E)}return c};var k=this.clearDefaultStyle;this.clearDefaultStyle=function(){k.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
-"https://desk.draw.io/support/solutions/articles/16000051979");var m=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return m.apply(this,arguments)};var l=c.addClickHandler;c.addClickHandler=function(a,b,e){var d=b;b=function(a,b){if(null==b){var e=mxEvent.getSource(a);
+"https://desk.draw.io/support/solutions/articles/16000051979");var n=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return n.apply(this,arguments)};var l=c.addClickHandler;c.addClickHandler=function(a,b,e){var d=b;b=function(a,b){if(null==b){var e=mxEvent.getSource(a);
"a"==e.nodeName.toLowerCase()&&(b=e.getAttribute("href"))}null!=b&&c.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&c.customLinkClicked(b)&&mxEvent.consume(a);null!=d&&d(a,b)};l.call(this,a,b,e)};d.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");
-var n=c.getExportVariables;c.getExportVariables=function(){var b=n.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var t=c.getGlobalVariable;c.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():
+var m=c.getExportVariables;c.getExportVariables=function(){var b=m.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var t=c.getGlobalVariable;c.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():
"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:t.apply(this,arguments)};var q=c.labelLinkClicked;c.labelLinkClicked=function(a,b,e){var d=b.getAttribute("href");if(null==d||!c.isCustomLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!c.isEnabled()||null!=a&&c.isCellLocked(a.cell))c.customLinkClicked(d),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=
-function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
+function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,
function(a){var b=this.editor.graph,c=b.cellEditor.text2,e=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=e&&(e.parentNode.removeChild(e),e=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<
a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,e,d,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var e=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,e)),d/Math.max(1,a));b.insertImage(decodeURIComponent(c),e*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()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view,x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");
-null!=x&&(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)})),x.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)}}x=document.getElementById("geInfo");
-null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=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!=A&&(A.parentNode.removeChild(A),A=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),e=c.view.translate,d=c.view.scale,f=b.x/d-e.x,g=b.y/d-e.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));
-else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,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=c.sanitizeHtml(m);var k=null,e=b.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),
-null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(k=!0)):(e=b.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(m=mxUtils.getTextContent(b[0]))));var n=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,f,g,!0,k,null,n))});k&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?
+a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(v=this.editor.graph.view,v.setUnit(mxSettings.getUnit()),v.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,v.unit),this.refresh());if("1"==urlParams.styledev){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 D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}v=document.getElementById("geInfo");
+null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=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!=z&&(z.parentNode.removeChild(z),z=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),e=c.view.translate,d=c.view.scale,f=b.x/d-e.x,g=b.y/d-e.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));
+else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,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=c.sanitizeHtml(k);var n=null,e=b.getElementsByTagName("img");null!=e&&1==e.length?(k=e[0].getAttribute("src"),
+null==k&&(k=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(e=b.getElementsByTagName("a"),null!=e&&1==e.length?k=e[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(k=mxUtils.getTextContent(b[0]))));var m=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&null!=k&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?
this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var b=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,b)),e/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*e,a*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(l,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.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,e=!1,d=0;d<c.types.length;d++)if("text/"===
-c.types[d].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var k=f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var n=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],n.x,n.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+c.types[d].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var k=f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position=
"absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var 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||(d.style.left=c.container.scrollLeft+10+"px",d.style.top=c.container.scrollTop+10+"px",c.container.appendChild(d),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,
-"keyup",mxUtils.bind(this,function(a){var 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(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),
-this.copyCells(d,!0),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:m.apply(this,arguments)}};
-EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
-"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
-this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(b){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("customFonts");this.menus.customFonts=b;mxSettings.setCustomFonts(b);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("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
-function(a,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,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 e=mxUtils.sortCells(b.model.getTopmostCells(b.getSelectionCells())),d=mxUtils.getXml(b.encodeCells(e));mxUtils.setTextContent(a,encodeURIComponent(d));c?(b.removeCells(e,!1),b.lastPasteXml=
-null):(b.lastPasteXml=d,b.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,c,d,f){if(!mxEvent.isConsumed(a)){var b=c,e=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),b=document.createElement("div");b.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);e=!0;g=b.getElementsByTagName("style");if(null!=g)for(;0<
-g.length;)g[0].parentNode.removeChild(g[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(g=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,g==b.firstChild.nextSibling.getAttribute("href")&&
-(mxUtils.setTextContent(b,g),e=!1));k=k&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName&&(g=k.getAttribute("src"),null!=g&&(mxUtils.setTextContent(b,g),e=!1));e&&Graph.removePasteFormatting(b)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(b=document.createElement("div"),mxUtils.setTextContent(b,g))}k=b.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===
-k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{e=e?b.innerHTML:mxUtils.trim(null==b.innerText?mxUtils.getTextContent(b):
-b.innerText);g=!1;try{var n=e.lastIndexOf("%3E");0<=n&&n<e.length-3&&(e=e.substring(0,n+3))}catch(E){}try{var k=b.getElementsByTagName("span"),p=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(e);this.isCompatibleString(p)&&(g=!0,e=p)}catch(E){}try{var q=this.editor.graph;if(null!=e&&0<e.length){q.lastPasteXml==e?q.pasteCounter++:(q.lastPasteXml=e,q.pasteCounter=0);var A=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(e))q.setSelectionCells(this.importXml(e,
-A,A));else if(f&&1==q.getSelectionCount()){var C=q.getStartEditingCell(q.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==q.getCurrentCellStyle(C)[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_IMAGE,e,[C]):(q.labelChanged(C,e),Graph.isLink(e)&&q.setLinkForCell(C,e));q.setSelectionCell(C)}else{var z=q.getInsertPoint();q.isMouseInsertPoint()&&(A=0,q.lastPasteXml==e&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(e,z.x+A,z.y+A,!0))}q.isSelectionEmpty()||
-(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(E){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(E){this.handleError(E)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),
-mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
-this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var e=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?
-e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+
-encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=
-function(a){var b=0,c=0,d,f;if(null==a){f=document.body;var l=document.documentElement;d=(f.clientWidth||l.clientWidth)-3;f=Math.max(f.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=b+"px";l.style.left=c+"px";l.style.width=Math.max(0,d-3)+"px";l.style.height=
-Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};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.openFileHandle=function(a,
-c,d,f,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var b=mxUtils.bind(this,function(a){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,c))}catch(y){this.handleError(y,
-mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,c,f)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(d,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,c))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),
-200<=a.status&&299>=a.status?b(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,c,f)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();
-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,c,f)}));else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==
-d.type){var e=Editor.extractGraphModelFromPdf(a);null!=e&&(a=e)}this.spinner.stop();this.openLocalFile(a,c,f,k,null!=k?d:null)}}};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){try{this.openFileHandle(b.target.result,a.name,a,c)}catch(v){this.handleError(v)}});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);
-window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?b.readAsText(a):b.readAsDataURL(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,c,d,f,k){var b=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var b=mxUtils.parseXml(a);null!=b&&(this.editor.setGraphXml(b.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-a,c||this.defaultFilename,d,f,k))});if(null!=a&&0<a.length)null==b||!b.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=b&&b.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,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=b&&b.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var 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=[],d;for(d in a)c.push(d);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 d=this.editor.graph,e=d.getCellStyle(a);b(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(b(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),b(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),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.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
-a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
-this.installMessageHandler(mxUtils.bind(this,function(a,c,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();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,c){null!=a?a.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
-pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,l=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,
-l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
-(a=Graph.decompress(a)))}catch(da){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(U){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?
-mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
-result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));
-try{m.init()}catch(U){k.postMessage(JSON.stringify({event:"draft",error:U.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,message:g}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),
-null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},
-0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=
-g.modified);return}if("spinner"==g.action){var v=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var u=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
-this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=J;k.postMessage(JSON.stringify(b),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container);K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=
-L){for(var O=u.getGlobalVariable,u=this.createTemporaryGraph(u.getStylesheet()),H,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){H=this.updatePageRoot(this.pages[S]);break}u.getGlobalVariable=function(a){return"page"==a?H.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(u.container);u.model.setRoot(H.root)}if(null!=g.layerIds){for(var fa=u.model,ga=fa.getChildCells(fa.getRoot()),m={},S=0;S<g.layerIds.length;S++)m[g.layerIds[S]]=!0;for(S=0;S<ga.length;S++)fa.setVisible(ga[S],
-m[ga[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,null,null,null,u)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=
-a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);v=this.createLoadMessage("export");v.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ba=this.getXmlFileData();v.xml=mxUtils.getXml(ba);v.data=this.getFileData(null,null,!0,null,null,null,ba);v.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),
-v.data=this.getHtml(J,this.editor.graph),v.xml=mxUtils.getXml(J),v.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);v.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);v.format="svg";var X=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=Editor.createSvgDataUri(a);k.postMessage(JSON.stringify(v),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,
-null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(v.xml,this.editor.graph,null,!0,X,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var ca=this.editor.graph.getSvg(Y);this.embedFonts(ca,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){X(mxUtils.getXml(a))})):X(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(v),
-"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==
-uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var ha=
-this.getCurrentFile();null!=ha&&(n=l(g.xml),null!=n&&""!=n&&ha.mergeFile(new LocalFile(this,n),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),
-"*");return}}catch(U){this.handleError(U)}}var ea=mxUtils.bind(this,function(e,g){c=!0;try{a(e,g)}catch(la){this.handleError(la)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=l();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||
-window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",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));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=e;k.postMessage(JSON.stringify(m),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ea(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===
-typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ea(a.responseText,e)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ea(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),
-ea(g,e))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*");if("json"==urlParams.proto){var n=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,c){n.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,target:b,allowOpener:c}),"*")}}};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":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var d=c;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(c)):(mxUtils.write(c,mxResources.get("save")),
-c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),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.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
-a.appendChild(c),d=c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("exit")),c.setAttribute("title",mxResources.get("exit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};
-EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=
-function(a,c){for(var b=this.editor.graph,d=b.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](b);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(b.getDefaultParent(),0==d.length?null:d)},e==a.length-1,c)}};EditorUi.prototype.importCsv=function(a,c){try{var b=a.split("\n"),d=[],e=[],f={};if(0<b.length){var k={},n=null,q=null,x=null,D=null,A=null,C=null,z=null,E=null,G="",F="auto",I="auto",J=null,u=null,K=40,B=40,L=100,
-O=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=c?c(ra):(H.setSelectionCells(ra),H.scrollCellToVisible(H.getSelectionCell()))},fa=H.getFreeInsertPoint(),ga=fa.x,ba=fa.y,fa=ba,Y=null,X="auto",E=null,ca=[],ha=null,ea=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 da=a.indexOf(":");if(0<da){var Q=mxUtils.trim(a.substring(1,
-da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?Y=H.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?D=M:"labels"==Q&&0<M.length&&"-"!=M?A=JSON.parse(M):"style"==Q?n=M:"parentstyle"==Q?C=M:"stylename"==Q&&0<M.length&&"-"!=M?x=M:"styles"==Q&&0<M.length&&"-"!=M?q=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?z=M:"parent"==Q&&0<M.length&&"-"!=M?E=M:"namespace"==Q&&0<M.length&&"-"!=M?G=M:"width"==Q?F=M:"height"==Q?I=M:"left"==Q&&0<M.length?J=M:"top"==Q&&0<M.length?u=M:"ignore"==Q?ea=M.split(","):
-"connect"==Q?ca.push(JSON.parse(M)):"link"==Q?ha=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?B=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(X=M)}}}if(null==b[U])throw Error(mxResources.get("invalidOrMissingFile"));for(var la=this.editor.csvToArray(b[U]),Q=da=null,M=[],P=0;P<la.length;P++)z==la[P]&&(da=P),E==la[P]&&(Q=P),M.push(mxUtils.trim(la[P]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=
-ca)for(var T=0;T<ca.length;T++)null==k[ca[T].to]&&(k[ca[T].to]={});z=[];for(P=U+1;P<b.length;P++){var ja=this.editor.csvToArray(b[P]);if(null==ja){var sa=40<b[P].length?b[P].substring(0,40)+"...":b[P];throw Error(sa+" ("+P+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&z.push(ja)}H.model.beginUpdate();try{for(P=0;P<z.length;P++){var ja=z[P],N=null,oa=null!=da?G+ja[da]:null;null!=oa&&(N=H.model.getCell(oa));var b=null!=N,W=new mxCell(Y,new mxGeometry(ga,fa,0,0),n||"whiteSpace=wrap;html=1;");
-W.vertex=!0;W.id=oa;for(var Z=0;Z<ja.length;Z++)H.setAttributeForCell(W,M[Z],ja[Z]);if(null!=D&&null!=A){var R=A[W.getAttribute(D)];null!=R&&H.labelChanged(W,R)}if(null!=x&&null!=q){var ia=q[W.getAttribute(x)];null!=ia&&(W.style=ia)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,W.style);b&&(H.model.setGeometry(N,W.geometry),H.model.setStyle(N,W.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=W;if(!b)for(T=0;T<ca.length;T++)k[ca[T].to][N.getAttribute(ca[T].to)]=N;null!=ha&&
-"link"!=ha&&(H.setLinkForCell(N,N.getAttribute(ha)),H.setAttributeForCell(N,ha,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ka=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=J&&null!=N.getAttribute(J)&&(N.geometry.x=ga+parseFloat(N.getAttribute(J))),null!=u&&null!=N.getAttribute(u)&&(N.geometry.y=ba+parseFloat(N.getAttribute(u))),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.width=parseFloat(N.getAttribute(F.substring(1))):N.geometry.width=
-"auto"==F?ka.width+O:parseFloat(F),"@"==I.charAt(0)&&null!=N.getAttribute(I.substring(1))?N.geometry.height=parseFloat(N.getAttribute(I.substring(1))):N.geometry.height="auto"==I?ka.height+O:parseFloat(I),fa+=N.geometry.height+B);b?(null==f[oa]&&(f[oa]=[]),f[oa].push(N)):(E=null!=Q?H.model.getCell(G+ja[Q]):null,d.push(N),null!=E?(E.style=H.replacePlaceholders(E,C),H.addCell(N,E)):e.push(H.addCell(N)))}for(var qa=e.slice(),ra=e.slice(),T=0;T<ca.length;T++)for(var Aa=ca[T],P=0;P<d.length;P++){var N=
-d[P],wa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(H.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=k[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?H.replacePlaceholders(l,c.style):H.createCurrentEdgeStyle(),g=H.insertEdge(null,null,g||"",c.invert?
-f:a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);g.insert(n)}ra.push(g);mxUtils.remove(c.invert?a:f,qa)}}});wa(N,N,Aa);if(null!=f[N.id])for(Z=0;Z<f[N.id].length;Z++)wa(N,f[N.id][Z],Aa)}if(null!=ea)for(P=0;P<d.length;P++)for(N=
-d[P],Z=0;Z<ea.length;Z++)H.setAttributeForCell(N,mxUtils.trim(ea[Z]),null);if(0<e.length){var pa=new mxParallelEdgeLayout(H);pa.spacing=K;var xa=function(){0<pa.spacing&&pa.execute(H.getDefaultParent());for(var a=0;a<e.length;a++){var b=H.getCellGeometry(e[a]);b.x=Math.round(H.snap(b.x));b.y=Math.round(H.snap(b.y));"auto"==F&&(b.width=Math.round(H.snap(b.width)));"auto"==I&&(b.height=Math.round(H.snap(b.height)))}};if("["==X.charAt(0)){var ya=S;H.view.validate();this.executeLayoutList(JSON.parse(X),
-function(){xa();ya()});S=null}else if("circle"==X){var ma=new mxCircleLayout(H);ma.resetEdges=!1;var ta=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return ta.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ma.execute(H.getDefaultParent());xa()},!0,S);S=null}else if("horizontaltree"==X||"verticaltree"==X||"auto"==X&&ra.length==2*e.length-1&&1==qa.length){H.view.validate();var Ba=new mxCompactTreeLayout(H,"horizontaltree"==X);Ba.levelDistance=B;Ba.edgeRouting=!1;Ba.resetEdges=
-!1;this.executeLayout(function(){Ba.execute(H.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==X||"verticalflow"==X||"auto"==X&&1==qa.length){H.view.validate();var ua=new mxHierarchicalLayout(H,"horizontalflow"==X?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ua.intraCellSpacing=B;ua.parallelEdgeSpacing=K;ua.interRankCellSpacing=L;ua.disableEdgeStyle=!1;this.executeLayout(function(){ua.execute(H.getDefaultParent(),ra);H.moveCells(ra,ga,ba)},!0,S);S=null}else if("organic"==
-X||"auto"==X&&ra.length>e.length){H.view.validate();var na=new mxFastOrganicLayout(H);na.forceConstant=3*B;na.resetEdges=!1;var Ia=na.isVertexIgnored;na.isVertexIgnored=function(a){return Ia.apply(this,arguments)||0>mxUtils.indexOf(e,a)};pa=new mxParallelEdgeLayout(H);pa.spacing=K;this.executeLayout(function(){na.execute(H.getDefaultParent());xa()},!0,S);S=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=S&&S()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=function(a){var b=
-"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,c,d){a=new LinkDialog(this,a,c,d,!0);this.showDialog(a.container,560,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 f=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 f.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 l=b.init;b.init=function(){l.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,c){var b=1;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.gitLab||b++;c&&a&&isLocalStorage&&"1"==urlParams.browser&&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 d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
-null!=a&&a.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);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));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};
-var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,c=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.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!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(c&&
-(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||
-"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(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,d,f,k,l,n){var b=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(c,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(c,"svg",mxUtils.getXml(b.getSvg(f,k,l)),"image/svg+xml");else{var e=a.getFileData(!0,null,null,null,null,!0),g=b.getGraphBounds(),m=Math.floor(g.width*k/b.view.scale),p=Math.floor(g.height*k/b.view.scale);if(e.length<=MAX_REQUEST_SIZE&&m*p<MAX_AREA)if(a.hideDialog(),
-"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:b.getExportVariables()};a.saveRequest(c,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<n?"&dpi="+n:"")+"&bg="+(null!=f?f:"none")+"&w="+m+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(e))})}else"png"==d?a.exportImage(k,null==f||"none"==f,!0,!1,!1,l,!0,!1,null,null,n):a.exportImage(k,!1,!0,!1,
-!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,c="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var f=a;this.currentPage!=this.pages[d]&&(f=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),f.model.setRoot(this.pages[d].root));c+=this.pages[d].getName()+" "+f.getIndexableText()+" "}else c=a.getIndexableText();this.editor.graph.setEnabled(!0);
-return c};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';
-var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var n=k[a];if("R"==n.substring(0,1)){var q=JSON.parse(decodeURIComponent(n.substring(1)));l[q[0]]={id:q[0],title:q[1],downloadUrl:q[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];l[d.id]&&
-(b[d.id]=d);var e=this.addCheckbox(f,d.title,l[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==l[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));
-for(c in l)b[c]||this.closeLibrary(new RemoteLibrary(this,null,l[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
-EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):
-c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,c,d,f,k){var b=!0,e=window.setTimeout(mxUtils.bind(this,function(){b=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(e);b&&f.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(e);b&&k.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:g,error:m});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,c){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=
-this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(c=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){b(null,"Invalid Call: "+d+" is not allowed.");return}}var n=a.functionArgs;Array.isArray(n)||(n=[]);if(e.isAsync)n.push(function(){b(Array.prototype.slice.apply(arguments))}),n.push(function(a){b(null,a||"Unkown Error")}),this[d].apply(this,n);else{var q=this[d].apply(this,n);b([q])}}else b(null,"Invalid Call: "+
-d+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=function(a,c){if(null==this.database){var b=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=b)try{var d=b.open("database",2);d.onupgradeneeded=function(a){try{var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(v){null!=c&&c(v)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
-urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),n=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(J){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?n(f.resp[0]):k())}}catch(J){console.log(J)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=c;d.onblocked=function(){}}catch(m){null!=c&&c(m)}else null!=c&&c()}else a(this.database)};
-EditorUi.prototype.setDatabaseItem=function(a,c,d,f,k){this.openDatabase(mxUtils.bind(this,function(b){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],c=[c]);var e=b.transaction(k,"readwrite");e.oncomplete=d;e.onerror=f;for(b=0;b<k.length;b++)e.objectStore(k[b]).put(null!=a&&null!=a[b]?{key:a[b],data:c[b]}:c[b])}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.removeDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);b=b.transaction(f,
-"readwrite");b.oncomplete=c;b.onerror=d;for(var e=0;e<f.length;e++)b.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){try{f=f||"objects";var e=b.transaction([f],"readonly").objectStore(f).get(a);e.onsuccess=function(){c(e.result)};e.onerror=d}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],
-"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=c}catch(v){null!=c&&c(v)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=c}catch(l){null!=c&&c(l)}}),c)};EditorUi.prototype.commentsSupported=
-function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,c){var b=this.getCurrentFile();null!=b?b.getComments(a,c):a([])};EditorUi.prototype.addComment=function(a,c,d){var b=this.getCurrentFile();
-null!=b?b.addComment(a,c,d):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,c){var b=this.getCurrentFile();return null!=b?b.newComment(a,c):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();
-return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,c){var b=this.getCurrentFile();null!=b&&b.getRevisions?b.getRevisions(a,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language",
-"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,c,d,f,k,l,n,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,c,d,f,k,l,n,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
-return this.editor.embedCssFonts(a,c)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,c,d,f,k,l,n,q,y,x,D,A,C,z,E,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,c,d,f,k,l,n,q,y,x,D,A,C,z,E,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
-return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,c,d,f)};EditorUi.prototype.convertImageToDataUri=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,c)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=
-function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,c,d,f)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,c,d,f,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,c,d,f,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
-urlParams.forceMigration)return null;for(var a=[],c=0;c<localStorage.length;c++){var d=localStorage.key(c),f=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<f.length){var k="<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(k||f)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
-var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,c,f,d,k,n){function q(){for(var a=A.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==A&&b++;C.style.display=0==b?"block":"none"}function b(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}y={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
-"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),q()):e();y=null});n.className="geCommentEditBtn";l.appendChild(n);var m=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);y=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(m.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));m.focus();m.className="geCommentEditBtn gePrimaryBtn";l.appendChild(m);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function e(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function p(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function m(a){a.style.border="";a.removeChild(a.busyImg)}function l(c,d,f,k,n){function B(a,b,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){b(a,c);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);d&&(e.style.display="none")}function u(){function a(c){b.push(d);if(null!=c.replies)for(var e=0;e<c.replies.length;e++)d=d.nextSibling,a(c.replies[e])}var b=[],d=x;a(c);return{pdiv:d,replies:b}}function z(d,e,f,n,q){function t(){g(z);c.addReply(x,function(a){x.id=a;c.replies.push(x);m(z);f&&f()},function(b){y();p(z);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,q)}function y(){b(x,z,function(a){t()},!0)}var B=u().pdiv,x=a.newComment(d,a.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var z=l(x,c.replies,B,k+1);e?y():t()}if(n||!c.isResolved){C.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",c.id);x.style.marginLeft=20*k+5+"px";c.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
+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&&93!=a.keyCode)||f||(d.style.left=c.container.scrollLeft+10+"px",d.style.top=c.container.scrollTop+10+"px",c.container.appendChild(d),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,
+null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var 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(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,
+"cut",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=
+function(a){return mxEvent.getSource(a)==d?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");
+if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,
+function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(b){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("customFonts");this.menus.customFonts=b;mxSettings.setCustomFonts(b);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("dark"==uiTheme);
+this.addListener("gridColorChanged",mxUtils.bind(this,function(a,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,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 e=mxUtils.sortCells(b.model.getTopmostCells(b.getSelectionCells())),d=mxUtils.getXml(b.encodeCells(e));mxUtils.setTextContent(a,
+encodeURIComponent(d));c?(b.removeCells(e,!1),b.lastPasteXml=null):(b.lastPasteXml=d,b.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,c,d,f){if(!mxEvent.isConsumed(a)){var b=c,e=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),b=document.createElement("div");b.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);
+e=!0;g=b.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(g=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,
+g==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,g),e=!1));k=k&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName&&(g=k.getAttribute("src"),null!=g&&(mxUtils.setTextContent(b,g),e=!1));e&&Graph.removePasteFormatting(b)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(b=document.createElement("div"),mxUtils.setTextContent(b,g))}k=b.getElementsByTagName("span");
+if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));
+else{e=e?b.innerHTML:mxUtils.trim(null==b.innerText?mxUtils.getTextContent(b):b.innerText);g=!1;try{var m=e.lastIndexOf("%3E");0<=m&&m<e.length-3&&(e=e.substring(0,m+3))}catch(E){}try{var k=b.getElementsByTagName("span"),p=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(e);this.isCompatibleString(p)&&(g=!0,e=p)}catch(E){}try{var q=this.editor.graph;if(null!=e&&0<e.length){q.lastPasteXml==e?q.pasteCounter++:(q.lastPasteXml=e,q.pasteCounter=0);var z=q.pasteCounter*
+q.gridSize;if(g||this.isCompatibleString(e))q.setSelectionCells(this.importXml(e,z,z));else if(f&&1==q.getSelectionCount()){var C=q.getStartEditingCell(q.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==q.getCurrentCellStyle(C)[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_IMAGE,e,[C]):(q.labelChanged(C,e),Graph.isLink(e)&&q.setLinkForCell(C,e));q.setSelectionCell(C)}else{var A=q.getInsertPoint();q.isMouseInsertPoint()&&(z=0,q.lastPasteXml==e&&0<q.pasteCounter&&
+q.pasteCounter--);q.setSelectionCells(this.insertTextAt(e,A.x+z,A.y+z,!0))}q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(E){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(E){this.handleError(E)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",
+function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||
+"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var e=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,
+null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,
+null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,f;if(null==a){f=document.body;var l=document.documentElement;d=(f.clientWidth||l.clientWidth)-3;f=Math.max(f.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";
+l.style.top=b+"px";l.style.left=c+"px";l.style.width=Math.max(0,d-3)+"px";l.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};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.openFileHandle=function(a,c,d,f,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var b=mxUtils.bind(this,function(a){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
+f);try{this.loadLibrary(new LocalLibrary(this,a,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,c,f)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(d,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,
+c))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?b(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,c,f)}),mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,c,f)}));
+else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==d.type){var e=Editor.extractGraphModelFromPdf(a);null!=e&&(a=e)}this.spinner.stop();this.openLocalFile(a,c,f,k,null!=k?d:null)}}};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){try{this.openFileHandle(b.target.result,a.name,
+a,c)}catch(x){this.handleError(x)}});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?b.readAsText(a):b.readAsDataURL(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,c,d,f,k){var b=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var b=mxUtils.parseXml(a);
+null!=b&&(this.editor.setGraphXml(b.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,c||this.defaultFilename,d,f,k))});if(null!=a&&0<a.length)null==b||!b.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=b&&b.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,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=b&&b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var 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=[],d;for(d in a)c.push(d);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 d=this.editor.graph,e=d.getCellStyle(a);b(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(b(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),b(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),
+f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),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.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=
+a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,c,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();
+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,c){null!=a?a.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=
+function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,l=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,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&
+("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(da){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(U){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
+var n=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
+m,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(n.container,
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{n.init()}catch(U){k.postMessage(JSON.stringify({event:"draft",error:U.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,n=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
+name:c,message:g}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),
+null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(n.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
+null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?
+g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var u=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=J;k.postMessage(JSON.stringify(b),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container);
+K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=L){for(var O=u.getGlobalVariable,u=this.createTemporaryGraph(u.getStylesheet()),H,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){H=this.updatePageRoot(this.pages[S]);break}u.getGlobalVariable=function(a){return"page"==a?H.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(u.container);u.model.setRoot(H.root)}if(null!=g.layerIds){for(var fa=
+u.model,ga=fa.getChildCells(fa.getRoot()),n={},S=0;S<g.layerIds.length;S++)n[g.layerIds[S]]=!0;for(S=0;S<ga.length;S++)fa.setVisible(ga[S],n[ga[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,null,null,null,u)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");x.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();x.xml=mxUtils.getXml(aa);
+x.data=this.getFileData(null,null,!0,null,null,null,aa);x.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),x.data=this.getHtml(J,this.editor.graph),x.xml=mxUtils.getXml(J),x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);x.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);x.format="svg";var X=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=Editor.createSvgDataUri(a);
+k.postMessage(JSON.stringify(x),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,X,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var ba=this.editor.graph.getSvg(Y);this.embedFonts(ba,mxUtils.bind(this,function(a){g.embedImages||
+null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){X(mxUtils.getXml(a))})):X(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(x),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&
+(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(m),
+this.embedFilenameSpan=m),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var ha=this.getCurrentFile();null!=ha&&(m=l(g.xml),null!=m&&""!=m&&ha.mergeFile(new LocalFile(this,m),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):
+"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(U){this.handleError(U)}}var ea=mxUtils.bind(this,function(e,g){c=!0;try{a(e,g)}catch(la){this.handleError(la)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=l();
+d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",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));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var n=this.createLoadMessage("load");n.xml=e;k.postMessage(JSON.stringify(n),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",
+this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ea(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ea(a.responseText,e)}),""):null!=g&&"function"===
+typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ea(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),ea(g,e))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*");if("json"==urlParams.proto){var m=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,c){m.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,
+target:b,allowOpener:c}),"*")}}};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":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var d=c;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),
+mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(c)):(mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),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.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(c),d=c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("exit")),c.setAttribute("title",mxResources.get("exit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
+a.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));
+this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,c){for(var b=this.editor.graph,d=b.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](b);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(b.getDefaultParent(),0==d.length?null:d)},e==a.length-1,c)}};EditorUi.prototype.importCsv=function(a,c){try{var b=a.split("\n"),
+d=[],e=[],f={};if(0<b.length){var k={},m=null,q=null,v=null,D=null,z=null,C=null,A=null,E=null,G="",F="auto",I="auto",J=null,u=null,K=40,B=40,L=100,O=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=c?c(ra):(H.setSelectionCells(ra),H.scrollCellToVisible(H.getSelectionCell()))},fa=H.getFreeInsertPoint(),ga=fa.x,aa=fa.y,fa=aa,Y=null,X="auto",E=null,ba=[],ha=null,ea=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 da=a.indexOf(":");if(0<da){var Q=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?Y=H.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?D=M:"labels"==Q&&0<M.length&&"-"!=M?z=JSON.parse(M):"style"==Q?m=M:"parentstyle"==Q?C=M:"stylename"==Q&&0<M.length&&"-"!=M?v=M:"styles"==Q&&0<M.length&&"-"!=M?q=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?A=M:"parent"==Q&&0<M.length&&"-"!=M?E=M:
+"namespace"==Q&&0<M.length&&"-"!=M?G=M:"width"==Q?F=M:"height"==Q?I=M:"left"==Q&&0<M.length?J=M:"top"==Q&&0<M.length?u=M:"ignore"==Q?ea=M.split(","):"connect"==Q?ba.push(JSON.parse(M)):"link"==Q?ha=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?B=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(X=M)}}}if(null==b[U])throw Error(mxResources.get("invalidOrMissingFile"));for(var la=this.editor.csvToArray(b[U]),Q=da=null,M=[],P=0;P<la.length;P++)A==la[P]&&
+(da=P),E==la[P]&&(Q=P),M.push(mxUtils.trim(la[P]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=ba)for(var T=0;T<ba.length;T++)null==k[ba[T].to]&&(k[ba[T].to]={});A=[];for(P=U+1;P<b.length;P++){var ja=this.editor.csvToArray(b[P]);if(null==ja){var sa=40<b[P].length?b[P].substring(0,40)+"...":b[P];throw Error(sa+" ("+P+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&A.push(ja)}H.model.beginUpdate();try{for(P=0;P<A.length;P++){var ja=
+A[P],N=null,oa=null!=da?G+ja[da]:null;null!=oa&&(N=H.model.getCell(oa));var b=null!=N,W=new mxCell(Y,new mxGeometry(ga,fa,0,0),m||"whiteSpace=wrap;html=1;");W.vertex=!0;W.id=oa;for(var Z=0;Z<ja.length;Z++)H.setAttributeForCell(W,M[Z],ja[Z]);if(null!=D&&null!=z){var R=z[W.getAttribute(D)];null!=R&&H.labelChanged(W,R)}if(null!=v&&null!=q){var ia=q[W.getAttribute(v)];null!=ia&&(W.style=ia)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,W.style);b&&(H.model.setGeometry(N,
+W.geometry),H.model.setStyle(N,W.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=W;if(!b)for(T=0;T<ba.length;T++)k[ba[T].to][N.getAttribute(ba[T].to)]=N;null!=ha&&"link"!=ha&&(H.setLinkForCell(N,N.getAttribute(ha)),H.setAttributeForCell(N,ha,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ka=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=J&&null!=N.getAttribute(J)&&(N.geometry.x=ga+parseFloat(N.getAttribute(J))),null!=u&&null!=N.getAttribute(u)&&(N.geometry.y=aa+
+parseFloat(N.getAttribute(u))),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.width=parseFloat(N.getAttribute(F.substring(1))):N.geometry.width="auto"==F?ka.width+O:parseFloat(F),"@"==I.charAt(0)&&null!=N.getAttribute(I.substring(1))?N.geometry.height=parseFloat(N.getAttribute(I.substring(1))):N.geometry.height="auto"==I?ka.height+O:parseFloat(I),fa+=N.geometry.height+B);b?(null==f[oa]&&(f[oa]=[]),f[oa].push(N)):(E=null!=Q?H.model.getCell(G+ja[Q]):null,d.push(N),null!=E?(E.style=
+H.replacePlaceholders(E,C),H.addCell(N,E)):e.push(H.addCell(N)))}for(var qa=e.slice(),ra=e.slice(),T=0;T<ba.length;T++)for(var Aa=ba[T],P=0;P<d.length;P++){var N=d[P],wa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(H.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=k[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));
+var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?H.replacePlaceholders(l,c.style):H.createCurrentEdgeStyle(),g=H.insertEdge(null,null,g||"",c.invert?f:a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var n=c.labels[l],m=new mxCell(n.label||l,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");m.vertex=!0;m.connectable=!1;m.geometry.relative=!0;if(null!=n.dx||null!=n.dy)m.geometry.offset=new mxPoint(null!=n.dx?n.dx:0,null!=n.dy?n.dy:0);g.insert(m)}ra.push(g);
+mxUtils.remove(c.invert?a:f,qa)}}});wa(N,N,Aa);if(null!=f[N.id])for(Z=0;Z<f[N.id].length;Z++)wa(N,f[N.id][Z],Aa)}if(null!=ea)for(P=0;P<d.length;P++)for(N=d[P],Z=0;Z<ea.length;Z++)H.setAttributeForCell(N,mxUtils.trim(ea[Z]),null);if(0<e.length){var pa=new mxParallelEdgeLayout(H);pa.spacing=K;var xa=function(){0<pa.spacing&&pa.execute(H.getDefaultParent());for(var a=0;a<e.length;a++){var b=H.getCellGeometry(e[a]);b.x=Math.round(H.snap(b.x));b.y=Math.round(H.snap(b.y));"auto"==F&&(b.width=Math.round(H.snap(b.width)));
+"auto"==I&&(b.height=Math.round(H.snap(b.height)))}};if("["==X.charAt(0)){var ya=S;H.view.validate();this.executeLayoutList(JSON.parse(X),function(){xa();ya()});S=null}else if("circle"==X){var ma=new mxCircleLayout(H);ma.resetEdges=!1;var ta=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return ta.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ma.execute(H.getDefaultParent());xa()},!0,S);S=null}else if("horizontaltree"==X||"verticaltree"==X||"auto"==X&&ra.length==
+2*e.length-1&&1==qa.length){H.view.validate();var Ba=new mxCompactTreeLayout(H,"horizontaltree"==X);Ba.levelDistance=B;Ba.edgeRouting=!1;Ba.resetEdges=!1;this.executeLayout(function(){Ba.execute(H.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==X||"verticalflow"==X||"auto"==X&&1==qa.length){H.view.validate();var ua=new mxHierarchicalLayout(H,"horizontalflow"==X?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ua.intraCellSpacing=B;ua.parallelEdgeSpacing=K;
+ua.interRankCellSpacing=L;ua.disableEdgeStyle=!1;this.executeLayout(function(){ua.execute(H.getDefaultParent(),ra);H.moveCells(ra,ga,aa)},!0,S);S=null}else if("organic"==X||"auto"==X&&ra.length>e.length){H.view.validate();var na=new mxFastOrganicLayout(H);na.forceConstant=3*B;na.resetEdges=!1;var Ia=na.isVertexIgnored;na.isVertexIgnored=function(a){return Ia.apply(this,arguments)||0>mxUtils.indexOf(e,a)};pa=new mxParallelEdgeLayout(H);pa.spacing=K;this.executeLayout(function(){na.execute(H.getDefaultParent());
+xa()},!0,S);S=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=S&&S()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
+if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,c,d){a=new LinkDialog(this,a,c,d,!0);this.showDialog(a.container,560,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 f=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 f.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 l=b.init;b.init=function(){l.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,c){var b=1;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.gitLab||b++;c&&a&&isLocalStorage&&"1"==urlParams.browser&&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 d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);
+Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);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));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=
+function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,c=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.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!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(c&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(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,d,f,k,l,m){var b=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(c,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(c,"svg",mxUtils.getXml(b.getSvg(f,k,l)),"image/svg+xml");else{var e=a.getFileData(!0,null,null,
+null,null,!0),g=b.getGraphBounds(),n=Math.floor(g.width*k/b.view.scale),p=Math.floor(g.height*k/b.view.scale);if(e.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:b.getExportVariables()};a.saveRequest(c,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=f?f:
+"none")+"&w="+n+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(e))})}else"png"==d?a.exportImage(k,null==f||"none"==f,!0,!1,!1,l,!0,!1,null,null,m):a.exportImage(k,!1,!0,!1,!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,c="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var f=a;this.currentPage!=this.pages[d]&&(f=this.createTemporaryGraph(a.getStylesheet()),
+this.updatePageRoot(this.pages[d]),f.model.setRoot(this.pages[d].root));c+=this.pages[d].getName()+" "+f.getIndexableText()+" "}else c=a.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=
+document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var q=JSON.parse(decodeURIComponent(m.substring(1)));l[q[0]]={id:q[0],title:q[1],downloadUrl:q[2]}}}}catch(v){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==
+a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];l[d.id]&&(b[d.id]=d);var e=this.addCheckbox(f,d.title,l[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
+mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==l[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(A){this.handleError(A,
+mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in l)b[c]||this.closeLibrary(new RemoteLibrary(this,null,l[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,
+allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=
+a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,c,d,f,k){var b=!0,e=window.setTimeout(mxUtils.bind(this,function(){b=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(e);
+b&&f.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(e);b&&k.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:m});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,c){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",
+msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(c=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){b(null,"Invalid Call: "+d+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(e.isAsync)m.push(function(){b(Array.prototype.slice.apply(arguments))}),
+m.push(function(a){b(null,a||"Unkown Error")}),this[d].apply(this,m);else{var q=this[d].apply(this,m);b([q])}}else b(null,"Invalid Call: "+d+" is not found.")}catch(v){b(null,"Invalid Call: An error occured, "+v.message)}};EditorUi.prototype.openDatabase=function(a,c){if(null==this.database){var b=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=b)try{var d=b.open("database",2);d.onupgradeneeded=function(a){try{var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});
+2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=c&&c(x)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||
+"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=
+e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});
+a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(J){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(J){console.log(J)}});
+window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=c;d.onblocked=function(){}}catch(n){null!=c&&c(n)}else null!=c&&c()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,c,d,f,k){this.openDatabase(mxUtils.bind(this,function(b){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],c=[c]);var e=b.transaction(k,"readwrite");e.oncomplete=d;e.onerror=f;for(b=0;b<k.length;b++)e.objectStore(k[b]).put(null!=a&&null!=a[b]?{key:a[b],data:c[b]}:c[b])}catch(t){null!=
+f&&f(t)}}),f)};EditorUi.prototype.removeDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);b=b.transaction(f,"readwrite");b.oncomplete=c;b.onerror=d;for(var e=0;e<f.length;e++)b.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){try{f=f||"objects";var e=b.transaction([f],"readonly").objectStore(f).get(a);e.onsuccess=function(){c(e.result)};
+e.onerror=d}catch(x){null!=d&&d(x)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=c}catch(x){null!=c&&c(x)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(a,c,d){this.openDatabase(mxUtils.bind(this,
+function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=c}catch(l){null!=c&&c(l)}}),c)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=
+a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,c){var b=this.getCurrentFile();null!=b?b.getComments(a,c):a([])};EditorUi.prototype.addComment=function(a,c,d){var b=this.getCurrentFile();null!=b?b.addComment(a,c,d):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=
+function(a,c){var b=this.getCurrentFile();return null!=b?b.newComment(a,c):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,c){var b=this.getCurrentFile();null!=b&&b.getRevisions?b.getRevisions(a,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();
+return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,c,d,f,k,l,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,c,d,f,k,l,m,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
+return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,c)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,
+c,d,f,k,l,m,q,y,v,D,z,C,A,E,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,c,d,f,k,l,m,q,y,v,D,z,C,A,E,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,c,d,f)};EditorUi.prototype.convertImageToDataUri=
+function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,c)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,c,d,f)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};
+EditorUi.prototype.writeGraphModelToPng=function(a,c,d,f,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,c,d,f,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],c=0;c<localStorage.length;c++){var d=localStorage.key(c),f=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<f.length){var k="<mxfile "===
+f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(k||f)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(a,c,f,d,k,m){function q(){for(var a=z.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==z&&b++;C.style.display=0==b?"block":"none"}function b(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}y={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),q()):e();y=null});m.className="geCommentEditBtn";l.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);y=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";l.appendChild(n);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function e(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function p(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function n(a){a.style.border="";a.removeChild(a.busyImg)}function l(c,d,f,k,m){function B(a,b,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){b(a,c);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);d&&(e.style.display="none")}function u(){function a(c){b.push(d);if(null!=c.replies)for(var e=0;e<c.replies.length;e++)d=d.nextSibling,a(c.replies[e])}var b=[],d=v;a(c);return{pdiv:d,replies:b}}function A(d,e,f,m,q){function t(){g(A);c.addReply(v,function(a){v.id=a;c.replies.push(v);n(A);f&&f()},function(b){y();p(A);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,q)}function y(){b(v,A,function(a){t()},!0)}var B=u().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var A=l(v,c.replies,B,k+1);e?y():t()}if(m||!c.isResolved){C.style.display="none";var v=document.createElement("div");v.className="geCommentContainer";v.setAttribute("data-commentId",c.id);v.style.marginLeft=20*k+5+"px";c.isResolved&&"dark"!=uiTheme&&(v.style.backgroundColor="ghostWhite");
var E=document.createElement("div");E.className="geCommentHeader";var L=document.createElement("img");L.className="geCommentUserImg";L.src=c.user.pictureUrl||Editor.userImage;E.appendChild(L);L=document.createElement("div");L.className="geCommentHeaderTxt";E.appendChild(L);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,c.user.displayName||"");L.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",c.id);e(c,
-F);L.appendChild(F);x.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");x.appendChild(E);c.isLocked&&(x.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";E.appendChild(D);v||c.isLocked||0!=k&&!t||B(mxResources.get("reply"),function(){z("",!0)},c.isResolved);L=a.getCurrentUser();null==L||L.id!=c.user.id||v||c.isLocked||(B(mxResources.get("edit"),
-function(){function d(){b(c,x,function(){g(x);c.editComment(c.content,function(){m(x)},function(b){p(x);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(x);c.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var b=x.querySelectorAll(".geCommentAction");for(a=
-0;a<b.length;a++)b[a].parentNode.removeChild(b[a]);m(x);x.style.opacity="0.5"}else{b=u(c).replies;for(a=0;a<b.length;a++)A.removeChild(b[a]);for(a=0;a<d.length;a++)if(d[a]==c){d.splice(a,1);break}C.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(b){p(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));v||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function b(){var b=
-a.target;b.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(b,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=c.isResolved?"none":"",e=u(c).replies,f="dark"==uiTheme?"transparent":c.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=b.parentNode&&(k[l].style.display=d);G||(e[g].style.display="none")}q()}c.isResolved?z(mxResources.get("reOpened")+": ",!0,b,!1,
-!0):z(mxResources.get("markedAsResolved"),!1,b,!0)});x.appendChild(E);null!=f?A.insertBefore(x,f.nextSibling):A.appendChild(x);for(f=0;null!=c.replies&&f<c.replies.length;f++)E=c.replies[f],E.isResolved=c.isResolved,l(E,c.replies,null,k+1,n);null!=y&&(y.comment.id==c.id?(n=c.content,c.content=y.comment.content,b(c,x,y.saveCallback,y.deleteOnCancel),c.content=n):null==y.comment.id&&y.comment.pCommentId==c.id&&(A.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return x}}var v=
-!a.canComment(),t=a.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;A.style.bottom=parseInt(D)+7+"px";x.appendChild(A);var C=document.createElement("span");C.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(C,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=D;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter="none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!v){var E=D.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
-E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(c){function d(){b(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;F.push(b);m(f)},function(b){p(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=l(e,F,null,0);d();c.preventDefault();mxEvent.consume(c)});z.appendChild(E)}E=D.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
-E.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});z.appendChild(E);a.commentsRefreshNeeded()&&(E=D.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),
-mxEvent.addListener(E,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),z.appendChild(E));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){n();a.preventDefault();mxEvent.consume(a)}),z.appendChild(D));x.appendChild(z);var F=[],I=mxUtils.bind(this,function(){this.hasError=
-!1;if(null!=y)try{y.div=y.div.cloneNode(!0);var c=y.div.querySelector(".geCommentEditTxtArea"),d=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(B){a.handleError(B)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function c(a){if(null!=
-a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var b=0;b<a.length;b++)c(a[b].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});A.innerHTML="";A.appendChild(C);C.style.display="block";F=a;for(a=0;a<F.length;a++)c(F[a].replies),l(F[a],F,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(A.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(a){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
-(a&&a.message?": "+a.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=A.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<F.length;d++)a(F[d])}});setInterval(z,6E4);this.refreshCommentsTime=
-z;this.window=new mxWindow(mxResources.get("comments"),x,c,f,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
+F);L.appendChild(F);v.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");v.appendChild(E);c.isLocked&&(v.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";E.appendChild(D);x||c.isLocked||0!=k&&!t||B(mxResources.get("reply"),function(){A("",!0)},c.isResolved);L=a.getCurrentUser();null==L||L.id!=c.user.id||x||c.isLocked||(B(mxResources.get("edit"),
+function(){function d(){b(c,v,function(){g(v);c.editComment(c.content,function(){n(v)},function(b){p(v);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(v);c.deleteComment(function(a){if(!0===a){a=v.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var b=v.querySelectorAll(".geCommentAction");for(a=
+0;a<b.length;a++)b[a].parentNode.removeChild(b[a]);n(v);v.style.opacity="0.5"}else{b=u(c).replies;for(a=0;a<b.length;a++)z.removeChild(b[a]);for(a=0;a<d.length;a++)if(d[a]==c){d.splice(a,1);break}C.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){p(v);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));x||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function b(){var b=
+a.target;b.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(b,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=c.isResolved?"none":"",e=u(c).replies,f="dark"==uiTheme?"transparent":c.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=b.parentNode&&(k[l].style.display=d);G||(e[g].style.display="none")}q()}c.isResolved?A(mxResources.get("reOpened")+": ",!0,b,!1,
+!0):A(mxResources.get("markedAsResolved"),!1,b,!0)});v.appendChild(E);null!=f?z.insertBefore(v,f.nextSibling):z.appendChild(v);for(f=0;null!=c.replies&&f<c.replies.length;f++)E=c.replies[f],E.isResolved=c.isResolved,l(E,c.replies,null,k+1,m);null!=y&&(y.comment.id==c.id?(m=c.content,c.content=y.comment.content,b(c,v,y.saveCallback,y.deleteOnCancel),c.content=m):null==y.comment.id&&y.comment.pCommentId==c.id&&(z.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return v}}var x=
+!a.canComment(),t=a.canReplyToReplies(),y=null,v=document.createElement("div");v.className="geCommentsWin";v.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;z.style.bottom=parseInt(D)+7+"px";v.appendChild(z);var C=document.createElement("span");C.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(C,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=D;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter="none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!x){var E=D.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
+E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(c){function d(){b(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;F.push(b);n(f)},function(b){p(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=l(e,F,null,0);d();c.preventDefault();mxEvent.consume(c)});A.appendChild(E)}E=D.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
+E.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});A.appendChild(E);a.commentsRefreshNeeded()&&(E=D.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),
+mxEvent.addListener(E,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),A.appendChild(E));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),A.appendChild(D));v.appendChild(A);var F=[],I=mxUtils.bind(this,function(){this.hasError=
+!1;if(null!=y)try{y.div=y.div.cloneNode(!0);var c=y.div.querySelector(".geCommentEditTxtArea"),d=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(B){a.handleError(B)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function c(a){if(null!=
+a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var b=0;b<a.length;b++)c(a[b].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});z.innerHTML="";z.appendChild(C);C.style.display="block";F=a;for(a=0;a<F.length;a++)c(F[a].replies),l(F[a],F,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(z.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(a){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
+(a&&a.message?": "+a.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;A=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=z.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<F.length;d++)a(F[d])}});setInterval(A,6E4);this.refreshCommentsTime=
+A;this.window=new mxWindow(mxResources.get("comments"),v,c,f,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var J=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",J);this.destroy=function(){mxEvent.removeListener(window,"resize",J);this.window.destroy()}},ConfirmDialog=
-function(a,c,f,d,k,n,q,b,e,g,p){var m=document.createElement("div");m.style.textAlign="center";p=null!=p?p:44;var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight=p+"px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);m.appendChild(l);null!=g&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",g),l.appendChild(c),m.appendChild(l));g=document.createElement("div");
-g.style.textAlign="center";g.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(v.checked)});n.className="geBtn";null!=b&&(n.innerHTML=b+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");a.editor.cancelFirst&&g.appendChild(n);var t=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=f&&
-f(v.checked)});g.appendChild(t);null!=q?(t.innerHTML=q+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(n);m.appendChild(g);e?(g.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(v),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),l.appendChild(k),m.appendChild(l),
-mxEvent.addListener(k,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=m};function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+function(a,c,f,d,k,m,q,b,e,g,p){var n=document.createElement("div");n.style.textAlign="center";p=null!=p?p:44;var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight=p+"px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);n.appendChild(l);null!=g&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",g),l.appendChild(c),n.appendChild(l));g=document.createElement("div");
+g.style.textAlign="center";g.style.whiteSpace="nowrap";var x=document.createElement("input");x.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(x.checked)});m.className="geBtn";null!=b&&(m.innerHTML=b+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&g.appendChild(m);var t=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=f&&
+f(x.checked)});g.appendChild(t);null!=q?(t.innerHTML=q+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(m);n.appendChild(g);e?(g.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(x),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),l.appendChild(k),n.appendChild(l),
+mxEvent.addListener(k,"click",function(a){x.checked=!x.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=n};function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=this.name=f}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,c,f){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=f&&(c.viewState=f,this.neverShown=!1))}
@@ -3658,8 +3660,8 @@ this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNod
(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+c.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+c.viewState.scrollTop),f=c);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,c){for(var f=c.getProperty("edit").changes,b=0;b<f.length;b++)if(f[b]instanceof SelectPage||f[b]instanceof RenamePage||f[b]instanceof MovePage||f[b]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(a,c,f){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,c):(d.setViewState(c),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+c.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+c.scrollTop,d.restoreSelection(f))};
-Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),n=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null,b=a.getAttribute("extFonts");if(b)try{b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=
-a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(d)||isNaN(k)?"undefined"===
+Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null,b=a.getAttribute("extFonts");if(b)try{b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=
+a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(d)||isNaN(k)?"undefined"===
typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:b||[]}};
Graph.prototype.saveViewState=function(a,c,f){f||(c.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),c.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),c.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),c.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),c.setAttribute("connect",null==a||a.connect?"1":"0"),c.setAttribute("arrows",null==a||a.arrows?"1":"0"),c.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),c.setAttribute("fold",
null==a||a.foldingEnabled?"1":"0"));c.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);f=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=f&&(c.setAttribute("pageWidth",f.width),c.setAttribute("pageHeight",f.height));null!=a&&null!=a.background&&c.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));c.setAttribute("math",
@@ -3675,17 +3677,17 @@ Graph.prototype.addExtFont=function(a,c,f){if(a&&c){var d="extFont_"+a;if(null==
d=!0;for(k=0;k<f.length;k++)if(f[k].name==a){d=!1;break}d&&this.extFonts.push({name:a,url:c})}}};
EditorUi.prototype.updatePageRoot=function(a,c){if(null==a.root){var f=this.editor.extractGraphModel(a.node,null,c),d=Editor.extractParserError(f);if(d)throw Error(d);null!=f?(a.graphModelNode=f,a.viewState=this.editor.graph.createViewState(f),d=new mxCodec(f.ownerDocument),a.root=d.decode(f).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){f=this.editor.extractGraphModel(a.node);if(d=Editor.extractParserError(f))throw Error(d);null!=f&&(a.graphModelNode=
f)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a};
-EditorUi.prototype.selectPage=function(a,c,f){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,f);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(n){this.handleError(n)}};
+EditorUi.prototype.selectPage=function(a,c,f){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,f);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(m){this.handleError(m)}};
EditorUi.prototype.selectNextPage=function(a){var c=this.currentPage;null!=c&&null!=this.pages&&(c=mxUtils.indexOf(this.pages,c),a?this.selectPage(this.pages[mxUtils.mod(c+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(c-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(a,c){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());c=null!=c?c:this.pages.length;var f=new ChangePage(this,a,a,c);this.editor.graph.model.execute(f)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
EditorUi.prototype.createPage=function(a,c){var f=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),c);f.setName(null!=a?a:this.createPageName());return f};EditorUi.prototype.createPageName=function(){for(var a={},c=0;c<this.pages.length;c++){var f=this.pages[c].getName();null!=f&&0<f.length&&(a[f]=f)}c=this.pages.length;do f=mxResources.get("pageWithNumber",[++c]);while(null!=a[f]);return f};
EditorUi.prototype.removePage=function(a){try{var c=this.editor.graph,f=mxUtils.indexOf(this.pages,a);if(c.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(f==this.pages.length-1?f--:f++,d=this.pages[f]):1>=this.pages.length&&(d=this.insertPage(),c.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,a,d))}finally{c.model.endUpdate()}}}catch(k){this.handleError(k)}return a};
-EditorUi.prototype.duplicatePage=function(a,c){var f=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");f=new DiagramPage(k);f.root=d.cloneCell(d.model.root);f.viewState=d.getViewState();f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(c);f=this.insertPage(f,mxUtils.indexOf(this.pages,a)+1)}}catch(n){this.handleError(n)}return f};
+EditorUi.prototype.duplicatePage=function(a,c){var f=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");f=new DiagramPage(k);f.root=d.cloneCell(d.model.root);f.viewState=d.getViewState();f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(c);f=this.insertPage(f,mxUtils.indexOf(this.pages,a)+1)}}catch(m){this.handleError(m)}return f};
EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,a,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return a};EditorUi.prototype.movePage=function(a,c){this.editor.graph.model.execute(new MovePage(this,a,c))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="13px";c.style.marginLeft="30px";for(var f=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-f)/this.pages.length)+1),k=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),k=b):mxEvent.consume(c)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k=
-null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&b!=k&&this.movePage(k,b);a.stopPropagation();a.preventDefault()}));c.appendChild(d)})(n,this.createTabForPage(this.pages[n],d,this.pages[n]!=this.currentPage,n+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);d=this.createPageMenuTab();
+f)/this.pages.length)+1),k=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),k=b):mxEvent.consume(c)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k=
+null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&b!=k&&this.movePage(k,b);a.stopPropagation();a.preventDefault()}));c.appendChild(d)})(m,this.createTabForPage(this.pages[m],d,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);d=this.createPageMenuTab();
this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(c.clientWidth>this.tabContainer.clientWidth-f){null!=d&&(d.style.position="absolute",d.style.right="0px",c.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 b=this.createControlTab(4,"&nbsp;&#10095;");
b.style.position="absolute";b.style.right=this.editor.chromeless?"0px":"29px";b.style.fontSize="13pt";this.tabContainer.appendChild(b);var e=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=e+"px";mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,e-20);mxUtils.setOpacity(q,0<c.scrollLeft?100:50);mxUtils.setOpacity(b,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(q,0<c.scrollLeft?100:
50);mxUtils.setOpacity(b,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,e-20);mxUtils.setOpacity(q,0<c.scrollLeft?100:50);mxUtils.setOpacity(b,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
@@ -3696,9 +3698,9 @@ EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<
0;b<this.pages.length;b++)mxUtils.bind(this,function(b){var d=a.addItem(this.pages[b].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[b])}),c);this.pages[b]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(b);if(this.editor.graph.isEnabled()){a.addSeparator(c);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),c);var d=this.currentPage;null!=d&&(a.addSeparator(c),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
function(){this.removePage(d)}),c),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),c),a.addSeparator(c),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(d,mxResources.get("copyOf",[d.getName()]))}),c))}}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var d=
mxEvent.getClientX(a),k=mxEvent.getClientY(a);c.popup(d,k,null,a);this.setCurrentMenu(c);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,c,f,d){f=this.createTab(f);var k=a.getName()||mxResources.get("untitled"),n=a.getId();f.setAttribute("title",k+(null!=n?" ("+n+")":"")+" ["+d+"]");mxUtils.write(f,k);f.style.maxWidth=c+"px";f.style.width=c+"px";this.addTabListeners(a,f);42<c&&(f.style.textOverflow="ellipsis");return f};
-EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var f=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(a);mxEvent.consume(c)}));var d=!1,k=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){d=null!=this.currentMenu;k=a==this.currentPage;f.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(n){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(n)&&k||mxEvent.isPopupTrigger(n))){f.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!d){var q=new mxPopupMenu(this.createPageMenu(a));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);this.resetCurrentMenu();q.destroy()});var b=mxEvent.getClientX(n),e=mxEvent.getClientY(n);q.popup(b,e,null,n);this.setCurrentMenu(q,c)}mxEvent.consume(n)}}))};
+EditorUi.prototype.createTabForPage=function(a,c,f,d){f=this.createTab(f);var k=a.getName()||mxResources.get("untitled"),m=a.getId();f.setAttribute("title",k+(null!=m?" ("+m+")":"")+" ["+d+"]");mxUtils.write(f,k);f.style.maxWidth=c+"px";f.style.width=c+"px";this.addTabListeners(a,f);42<c&&(f.style.textOverflow="ellipsis");return f};
+EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var f=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(a);mxEvent.consume(c)}));var d=!1,k=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){d=null!=this.currentMenu;k=a==this.currentPage;f.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(m)&&k||mxEvent.isPopupTrigger(m))){f.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!d){var q=new mxPopupMenu(this.createPageMenu(a));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);this.resetCurrentMenu();q.destroy()});var b=mxEvent.getClientX(m),e=mxEvent.getClientY(m);q.popup(b,e,null,m);this.setCurrentMenu(q,c)}mxEvent.consume(m)}}))};
EditorUi.prototype.getLinkForPage=function(a,c){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var f=this.getCurrentFile();if(null!=f&&f.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var d=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),d=d+((0==d.length?"?":"&")+"page-id="+a.getId());null!=c&&(d+="&"+c.join("&"));return window.location.protocol+"//"+window.location.host+"/"+d+"#"+f.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(a,c){return mxUtils.bind(this,function(f,d){var k=this.editor.graph;f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,c)}),d);null!=this.getLinkForPage(a)&&(f.addSeparator(d),f.addItem(mxResources.get("link"),
null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,d,b,e,f,p){c=this.createUrlParameters(c,d,b,e,f,p);b||c.push("hide-pages=1");k.isSelectionEmpty()||(b=k.getBoundingBox(k.getSelectionCells()),d=k.view.translate,e=k.view.scale,b.width/=e,b.height/=e,b.x=b.x/e-d.x,b.y=b.y/e-d.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(b.x),y:Math.round(b.y),width:Math.round(b.width),height:Math.round(b.height),border:100}))));
@@ -3707,42 +3709,42 @@ b=new EmbedDialog(this,this.getLinkForPage(a,c));this.showDialog(b.container,440
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(c,
a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,c,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(c.getAttribute("relatedPage"));if(null==k.relatedPage){var d=c.ownerDocument.createElement("diagram");d.setAttribute("id",c.getAttribute("relatedPage"));d.setAttribute("name",c.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=c.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),c.removeAttribute("viewState"));
-c=c.cloneNode(!0);d=c.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var f=d.getAttribute("id");null==a.lookup(f)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return c};a.afterDecode=function(a,c,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,f,n,q,b){f=null!=f?f:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var d=n.slice(),g=[],k=0;k<n.length;k++){var m=this.getCurrentCellStyle(n[k]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(n[k],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=n[k]&&g.push(a);return a==
-n[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(n[k],c))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!c);n=d;n=a.apply(this,arguments)}finally{this.model.endUpdate()}return n};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return y.isVertex(a)&&f(a)}function c(a){var b=!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving);
+c=c.cloneNode(!0);d=c.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var f=d.getAttribute("id");null==a.lookup(f)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return c};a.afterDecode=function(a,c,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,f,m,q,b){f=null!=f?f:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var d=m.slice(),g=[],k=0;k<m.length;k++){var n=this.getCurrentCellStyle(m[k]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(m[k],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=m[k]&&g.push(a);return a==
+m[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(m[k],c))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!c);m=d;m=a.apply(this,arguments)}finally{this.model.endUpdate()}return m};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return y.isVertex(a)&&f(a)}function c(a){var b=!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving);
return b}function f(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function q(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function b(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(a,c){c=null!=c?c:!0;t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingEdges(a),f=t.cloneCells([e[0],a]);t.model.setTerminal(f[0],t.model.getTerminal(e[0],!0),!0);var g=b(a),k=d.geometry;g==mxConstants.DIRECTION_SOUTH||
-g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=c?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=c?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),n=t.view.scale;if(null!=l){var m=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?m.x+=(c?a.geometry.width+10:-f[1].geometry.width-10)*n:m.y+=(c?a.geometry.height+10:-f[1].geometry.height-10)*n;var p=t.getOutgoingEdges(t.model.getTerminal(e[0],
-!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,y=k=e=0;y<p.length;y++){var x=t.model.getTerminal(p[y],!1);if(g==b(x)){var z=t.view.getState(x);x!=a&&null!=z&&(q&&c!=z.getCenterX()<l.getCenterX()||!q&&c!=z.getCenterY()<l.getCenterY())&&mxUtils.intersects(m,z)&&(e=10+Math.max(e,(Math.min(m.x+m.width,z.x+z.width)-Math.max(m.x,z.x))/n),k=10+Math.max(k,(Math.min(m.y+m.height,z.y+z.height)-Math.max(m.y,z.y))/n))}}q?k=0:e=0;for(y=0;y<p.length;y++)if(x=t.model.getTerminal(p[y],
-!1),g==b(x)&&(z=t.view.getState(x),x!=a&&null!=z&&(q&&c!=z.getCenterX()<l.getCenterX()||!q&&c!=z.getCenterY()<l.getCenterY()))){var B=[];t.traverse(z.cell,!0,function(a,b){null!=b&&B.push(b);B.push(a);return!0});t.moveCells(B,(c?1:-1)*e,(c?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var c=b(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);
-var f=t.model.getParent(a),g=f.geometry,k=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,n=a.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?l=0:c==mxConstants.DIRECTION_NORTH?(l=0,n=-n):c==mxConstants.DIRECTION_WEST?(l=-l,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);t.moveCells(k,l,n);return t.addCells(e,f)}finally{t.model.endUpdate()}}function p(a,c){t.model.beginUpdate();try{var d=
-t.model.getParent(a),e=t.getIncomingEdges(a),f=b(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=c);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var k=t.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),n;for(n in l)t.setCellStyles(n,l[n],[g[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==l[n]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?
-"vertical":"horizontal",[g[0]])}catch(da){}}var e=t.getOutgoingEdges(a),m=d.geometry,k=[];t.view.currentRoot==d&&(m=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),y=t.view.translate,z=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/z-y.x-m.x+10,g[1].geometry.y+=g[1].geometry.height-m.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
-null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/z-y.x+-m.x+10,g[1].geometry.y-=g[1].geometry.height+m.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+m.x+40):g[1].geometry.x+(g[1].geometry.width-m.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/z-y.y+-m.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function m(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,c){var d=b(a),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?v.actions.get("selectParent").funct():
-d==c?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=m(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var v=this,t=v.editor.graph,y=t.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
-if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);
-if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",
-function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],e=0;e<b.length;e++){var g=b[e];y.isEdge(g)&&f(g)&&(d.push(g),g=y.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=t.getIncomingEdges(b[e]),b=b.concat(g))}else null!=g&&d.push(b[e])}b=d;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
-d))};var A=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=A.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var n=this.cloneCell(g[0]);this.addEdge(n,
-t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var C=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var n=f,m=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(m,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=n&&f!=n&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]);
-if(0<q.length){var y=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=y){var z=t.view.getState(n);null!=z&&(c=(z.getCenterX()-y.getCenterX())/t.view.scale,d=(z.getCenterY()-y.getCenterY())/t.view.scale)}}}}l=C.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(n)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],n,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(n)&&0>mxUtils.indexOf(b,
-this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],n,!0);else if(0==t.getIncomingEdges(l[p]).length){m=n;if(null==m||m==t.model.getParent(b[p]))m=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),m,l[p])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var z=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=z.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
-null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
-(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
-null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(l(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){v.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=t.connectVertex;t.connectVertex=
-function(c,d,f,k,l,n,m){var q=t.getIncomingEdges(c);if(a(c)){var y=b(c),z=y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return y==d||0==q.length?p(c,d):z==x?g(c):e(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};t.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||q(b)||t.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
+g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=c?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=c?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),m=t.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(c?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(c?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=t.getOutgoingEdges(t.model.getTerminal(e[0],
+!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,y=k=e=0;y<p.length;y++){var u=t.model.getTerminal(p[y],!1);if(g==b(u)){var v=t.view.getState(u);u!=a&&null!=v&&(q&&c!=v.getCenterX()<l.getCenterX()||!q&&c!=v.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,v)&&(e=10+Math.max(e,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}q?k=0:e=0;for(y=0;y<p.length;y++)if(u=t.model.getTerminal(p[y],
+!1),g==b(u)&&(v=t.view.getState(u),u!=a&&null!=v&&(q&&c!=v.getCenterX()<l.getCenterX()||!q&&c!=v.getCenterY()<l.getCenterY()))){var A=[];t.traverse(v.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});t.moveCells(A,(c?1:-1)*e,(c?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var c=b(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);
+var f=t.model.getParent(a),g=f.geometry,k=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?l=0:c==mxConstants.DIRECTION_NORTH?(l=0,m=-m):c==mxConstants.DIRECTION_WEST?(l=-l,m=0):c==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(k,l,m);return t.addCells(e,f)}finally{t.model.endUpdate()}}function p(a,c){t.model.beginUpdate();try{var d=
+t.model.getParent(a),e=t.getIncomingEdges(a),f=b(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=c);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var k=t.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)t.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?
+"vertical":"horizontal",[g[0]])}catch(da){}}var e=t.getOutgoingEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),y=t.view.translate,v=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-y.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
+null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-y.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/v-y.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function n(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,c){var d=b(a),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?x.actions.get("selectParent").funct():
+d==c?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=n(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var x=this,t=x.editor.graph,y=t.getModel(),v=x.menus.createPopupMenu;x.menus.createPopupMenu=function(b,c,d){v.apply(this,arguments);
+if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};x.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);
+if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",
+function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(b,c){c=null!=
+c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],e=0;e<b.length;e++){var g=b[e];y.isEdge(g)&&f(g)&&(d.push(g),g=y.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=t.getIncomingEdges(b[e]),b=b.concat(g))}else null!=g&&d.push(b[e])}b=d;return D.apply(this,arguments)};x.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
+d))};var z=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=z.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
+t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var C=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]);
+if(0<q.length){var y=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=y){var v=t.view.getState(m);null!=v&&(c=(v.getCenterX()-y.getCenterX())/t.view.scale,d=(v.getCenterY()-y.getCenterY())/t.view.scale)}}}}l=C.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
+this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=x.sidebar){var A=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=A.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
+null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},G=x.onKeyDown;x.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
+(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
+null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(l(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){x.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=t.connectVertex;t.connectVertex=
+function(c,d,f,k,l,m,n){var q=t.getIncomingEdges(c);if(a(c)){var y=b(c),v=y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST,u=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return y==d||0==q.length?p(c,d):v==u?g(c):e(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};t.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||q(b)||t.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
return!0});return d};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
-this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
function(){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var u=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){u.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};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 f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=f.apply(this,arguments),c=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=
!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var b=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!0);b.insertEdge(d,!1);a.insert(d);a.insert(c);a.insert(b);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
c.vertex=!0;var b=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');b.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;
c.insertEdge(d,!0);b.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);f.insertEdge(k,!1);var m=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');m.vertex=!0;var 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;c.insertEdge(l,!0);m.insertEdge(l,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var t=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;c.insertEdge(t,!0);v.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(l);a.insert(t);a.insert(c);a.insert(b);a.insert(f);a.insert(m);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);f.insertEdge(k,!1);var n=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');n.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;c.insertEdge(l,!0);n.insertEdge(l,!1);var x=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');x.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);x.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(l);a.insert(t);a.insert(c);a.insert(b);a.insert(f);a.insert(n);a.insert(x);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;html=1;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -3765,8 +3767,8 @@ this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(
(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
"#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor=
-"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var n=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");n.apply(this,arguments)};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var b=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>
+"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateTabContainer;
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var b=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>
f&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):b.apply(this,arguments)};var e=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){e.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var 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="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");
@@ -3775,10 +3777,10 @@ a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUt
"geMenuItem";b.style.marginLeft="6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var p=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=
!0;p.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-",
"lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?
-this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var m=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.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),
-this.menus.findWindow=null);m.apply(this,arguments)};var l=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){l.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
-EditorUi.prototype.chromelessWindowResize=function(){};var v=Menus.prototype.init;Menus.prototype.init=function(){v.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
+this.menus.findWindow=null);n.apply(this,arguments)};var l=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){l.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
+EditorUi.prototype.chromelessWindowResize=function(){};var x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
function(){d.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
function(){c(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,mxResources.get("plantUml")+"...","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(b,mxResources.get("mermaid")+"...","mermaid");
b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,
@@ -3791,28 +3793,28 @@ function(a,c){b.menus.addMenuItems(a,"importText plantUml mermaid - formatSql im
function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",
c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
"30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat=
-"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
+"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?m.insertBefore(g,l.statusContainer):m.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
"no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled",
"disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function e(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?
-n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var c=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=c}p=n.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>f)||b("diagram");e([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
+m.insertBefore(c,l.statusContainer):m.appendChild(c);return c}function g(){for(var a=m.firstChild;null!=a;){var c=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=c}p=m.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>f)||b("diagram");e([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],a?60:null);c=b("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);e([c,d(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],a?60:null);if(411<=f&&(c=l.actions.get("undo"),a=l.actions.get("redo"),c=d("",c.funct,null,mxResources.get("undo")+" ("+c.shortcut+")",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("",
a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),e([c,a],60),480<=f)){var a=l.actions.get("zoomIn"),c=l.actions.get("zoomOut"),g=l.actions.get("resetView");
-e([d("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+e([d("",function(){n.popupMenuHandler.hideMenu();var a=n.view.scale,b=n.view.translate.x,c=n.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-n.view.scale)&&b==n.view.translate.x&&c==n.view.translate.y&&l.actions.get(n.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=f?d("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=f?d("",c.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==O&&(c=q.addMenu("",a.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor=
-"pointer",c.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(c),O=c),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}t.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=f||null!=urlParams.clibs||
-null!=urlParams.libs)&&c(this,!0);1E3<=f&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.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 p=null,q=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
-"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
-b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer=
+"pointer",c.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(c),O=c),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}t.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=f||null!=urlParams.clibs||
+null!=urlParams.libs)&&c(this,!0);1E3<=f&&a(this,!0);var l=this,n=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,q=new Menubar(l,m);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
+"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var x=l.descriptorChanged;l.descriptorChanged=function(){x.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
+b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};l.setStatusText(l.editor.getStatus());m.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(l.buttonContainer);l.menubarContainer=
l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var B=q.addMenu("100%",K.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration=
"none";B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(l.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";u.appendChild(B);K=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*
-l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(l.tabContainer);u.appendChild(n);u.appendChild(l.diagramContainer);
+l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(l.tabContainer);u.appendChild(m);u.appendChild(l.diagramContainer);
k.appendChild(u);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,c,f,d,k,n,q){this.file=a;this.id=c;this.content=f;this.modifiedDate=d;this.createdDate=k;this.isResolved=n;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,f,d,k){c()};DrawioComment.prototype.editComment=function(a,c,f){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DrawioUser=function(a,c,f,d,k){this.id=a;this.email=c;this.displayName=f;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,c,f,d,k,m,q){this.file=a;this.id=c;this.content=f;this.modifiedDate=d;this.createdDate=k;this.isResolved=m;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,f,d,k){c()};DrawioComment.prototype.editComment=function(a,c,f){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DrawioUser=function(a,c,f,d,k){this.id=a;this.email=c;this.displayName=f;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,c,f){this.init(a,c,f)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;
GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;
GraphViewer.prototype.init=function(a,c,f){this.graphConfig=null!=f?f:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=
@@ -3823,8 +3825,8 @@ mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,
1:"pagecount"==a?b.length:f.apply(this,arguments)}}}this.diagrams=[];var k=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};e=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=
[];this.xmlNode!=k&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),k=this.xmlNode)});this.addListener("xmlNodeChanged",e);e();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=
!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph);
-this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var m=this.graph.foldCells;this.graph.foldCells=mxUtils.bind(this,function(){this.cellFolded=
-!0;return m.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});f=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof f){var k=this.getObservableParent(a),n=new f(mxUtils.bind(this,function(c){0<a.offsetWidth&&(n.disconnect(),d())}));n.observe(k,{attributes:!0})}else d()}};
+this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var n=this.graph.foldCells;this.graph.foldCells=mxUtils.bind(this,function(){this.cellFolded=
+!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});f=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof f){var k=this.getObservableParent(a),m=new f(mxUtils.bind(this,function(c){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(k,{attributes:!0})}else d()}};
GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};
GraphViewer.prototype.setXmlNode=function(a){a=this.editor.extractGraphModel(a,!0);this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
@@ -3833,27 +3835,27 @@ c="relative"===document.body.style.position?document.body.getBoundingClientRect(
this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px");this.cellFolded&&(this.cellFolded=!1,this.center?this.graph.center():this.graph.view.setTranslate(0,0));f=!1}}),k=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var c=a.offsetWidth;c==k||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,
null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&
(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,c.width+2*this.graph.border),0==this.graphConfig.resize&&
-""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",
+""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var m=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(m);this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",
d);var q=mxUtils.bind(this,function(){var b=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||c.width+2*this.graph.border>a.offsetWidth||c.height+2*this.graph.border>d)){var f=null;null!=d&&c.height+2*this.graph.border>d-2&&(f=(d-2*this.graph.border-2)/c.height);this.fitGraph(f)}else this.widthIsEmpty||0!=this.graphConfig.resize||
""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-c.x/this.graph.view.scale),Math.floor(this.graph.border-c.y/this.graph.view.scale)),k=a.offsetWidth):this.graph.center((!this.widthIsEmpty||c.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=b});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){c=this.graph.getGraphBounds();k=null;q()}};
GraphViewer.prototype.updateContainerWidth=function(a,c){a.style.width=c+"px"};GraphViewer.prototype.updateContainerHeight=function(a,c){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=c+"px"};
-GraphViewer.prototype.showLayers=function(a,c){var f=this.graphConfig.layers,f=null!=f?f.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<f.length||k||null!=c){var n=null!=c?c.getModel():null,q=a.getModel();q.beginUpdate();try{for(var b=q.getChildCount(q.root),e=0;e<b;e++)q.setVisible(q.getChildAt(q.root,e),null!=c?n.isVisible(n.getChildAt(n.root,e)):!1);if(null==n)if(k)for(e=0;e<d.length;e++)q.setVisible(q.getCell(d[e]),!0);else for(e=0;e<f.length;e++)q.setVisible(q.getChildAt(q.root,
+GraphViewer.prototype.showLayers=function(a,c){var f=this.graphConfig.layers,f=null!=f?f.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<f.length||k||null!=c){var m=null!=c?c.getModel():null,q=a.getModel();q.beginUpdate();try{for(var b=q.getChildCount(q.root),e=0;e<b;e++)q.setVisible(q.getChildAt(q.root,e),null!=c?m.isVisible(m.getChildAt(m.root,e)):!1);if(null==m)if(k)for(e=0;e<d.length;e++)q.setVisible(q.getCell(d[e]),!0);else for(e=0;e<f.length;e++)q.setVisible(q.getChildAt(q.root,
parseInt(f[e])),!0)}finally{q.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var e=document.createElement("div");e.style.borderRight="1px solid #d0d0d0";e.style.padding="3px 6px 3px 6px";mxEvent.addListener(e,"click",a);null!=c&&e.setAttribute("title",c);e.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(e,"mouseenter",function(){e.style.backgroundColor="#ddd"}),mxEvent.addListener(e,"mouseleave",
function(){e.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),e.style.cursor="pointer"):mxUtils.setOpacity(e,30);e.appendChild(a);f.appendChild(e);p++;return e}var c=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?c.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(c.style.marginTop=this.toolbarHeight+"px");var f=c.ownerDocument.createElement("div");f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";
-f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="#eee";f.style.height=this.toolbarHeight+"px";this.toolbar=f;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(f,30);var d=null,k=null,n=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(f,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),n())}));mxEvent.addListener(f,mxClient.IS_POINTER?
+f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="#eee";f.style.height=this.toolbarHeight+"px";this.toolbar=f;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(f,30);var d=null,k=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(f,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),m())}));mxEvent.addListener(f,mxClient.IS_POINTER?
"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){q(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){q(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var b=this.graph,e=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<e&&Math.abs(this.scrollTop-b.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&(0<parseFloat(f.style.opacity||0)?n():q(30))}})}for(var g=this.toolbarItems,p=0,m=null,l=null,v=0;v<g.length;v++){var t=g[v];if("pages"==t){l=c.ownerDocument.createElement("div");
-l.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(l,70);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");y.style.borderRightStyle="none";y.style.paddingLeft="0px";y.style.paddingRight="0px";f.appendChild(l);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";t=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";y.style.display=l.style.display;x.style.display=l.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)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"==t){if(this.layersEnabled){var D=this.graph.getModel(),A=a(mxUtils.bind(this,function(a){if(null!=m)m.parentNode.removeChild(m),
-m=null;else{m=this.graph.createLayersDialog();mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});a=A.getBoundingClientRect();m.style.width="140px";m.style.padding="2px 0px 2px 0px";m.style.border="1px solid #d0d0d0";m.style.backgroundColor="#eee";m.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";m.style.fontSize="11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var b=mxUtils.getDocumentScrollOrigin(document);m.style.left=b.x+a.left+
-"px";m.style.top=b.y+a.bottom+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){A.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});A.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
+this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<e&&Math.abs(this.scrollTop-b.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&(0<parseFloat(f.style.opacity||0)?m():q(30))}})}for(var g=this.toolbarItems,p=0,n=null,l=null,x=0;x<g.length;x++){var t=g[x];if("pages"==t){l=c.ownerDocument.createElement("div");
+l.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(l,70);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");y.style.borderRightStyle="none";y.style.paddingLeft="0px";y.style.paddingRight="0px";f.appendChild(l);var v=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight="0px";t=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";y.style.display=l.style.display;v.style.display=l.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)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"==t){if(this.layersEnabled){var D=this.graph.getModel(),z=a(mxUtils.bind(this,function(a){if(null!=n)n.parentNode.removeChild(n),
+n=null;else{n=this.graph.createLayersDialog();mxEvent.addListener(n,"mouseleave",function(){n.parentNode.removeChild(n);n=null});a=z.getBoundingClientRect();n.style.width="140px";n.style.padding="2px 0px 2px 0px";n.style.border="1px solid #d0d0d0";n.style.backgroundColor="#eee";n.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";n.style.fontSize="11px";n.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(n,80);var b=mxUtils.getDocumentScrollOrigin(document);n.style.left=b.x+a.left+
+"px";n.style.top=b.y+a.bottom+"px";document.body.appendChild(n)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*p);null!=this.graphConfig.title&&(g=c.ownerDocument.createElement("div"),g.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;",g.setAttribute("title",this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,
70),f.appendChild(g),this.filename=g);this.minToolbarWidth=34*p;var C=c.style.border,g=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=c.getBoundingClientRect(),b=mxUtils.getScrollOrigin(document.body),b="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-b.x,top:-b.y},a={left:a.left-
-b.left,top:a.top-b.top,bottom:a.bottom-b.top,right:a.right-b.left};f.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=a.top+1+"px"):f.style.top=a.top+"px";"1px solid transparent"==C&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(f);var d=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=m&&(m.parentNode.removeChild(m),
-m=null);c.style.border=C});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==c||a==f||a==m)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else f.style.top=-this.toolbarHeight+"px",c.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",g):g()};
+b.left,top:a.top-b.top,bottom:a.bottom-b.top,right:a.right-b.left};f.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=a.top+1+"px"):f.style.top=a.top+"px";"1px solid transparent"==C&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(f);var d=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=n&&(n.parentNode.removeChild(n),
+n=null);c.style.border=C});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==c||a==f||a==n)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else f.style.top=-this.toolbarHeight+"px",c.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",g):g()};
GraphViewer.prototype.addClickHandler=function(a,c){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(f,d){if(null==d){var k=mxEvent.getSource(f);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=c?null==d||a.isCustomLink(d)?mxEvent.consume(f):a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){c.destroy()},0):null!=d&&null==c&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&
a.customLinkClicked(d)&&(mxUtils.clearSelection(),mxEvent.consume(f))}),mxUtils.bind(this,function(a){null!=c||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,c,f){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;f={client:1,lightbox:1,target:null!=f?f:"blank"};a&&(f.edit=this.graphConfig.edit||"_blank");if(null!=c?c:1)f.close=1;this.layersEnabled&&(f.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(f.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
@@ -3862,8 +3864,8 @@ f.drawdev="1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),c=document.createElement("div");mxClient.IS_QUIRKS?(c.style.position="absolute",c.style.left=a.x+"px",c.style.top=a.y+"px",c.style.width=document.body.offsetWidth+"px",c.style.height=document.body.offsetHeight+"px"):c.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";c.style.zIndex=this.lightboxZIndex;c.style.backgroundColor="#000000";mxUtils.setOpacity(c,70);document.body.appendChild(c);
var f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(f.style.position="absolute",f.style.right="32px",f.style.top=a.y+32+"px"):f.style.cssText="position:fixed;top:32px;right:32px;";f.style.cursor="pointer";mxEvent.addListener(f,"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?
this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var d=Graph.prototype.shadowId;Graph.prototype.shadowId=
-"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var n=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),q=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",n);document.body.removeChild(c);document.body.removeChild(f);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
-!0;q.apply(this,arguments)};var b=k.editor.graph,e=b.container;e.style.overflow="hidden";this.lightboxChrome?(e.style.border="1px solid #c0c0c0",e.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",n)):(c.style.display="none",f.style.display="none");var g=this;b.getImageFromBundles=function(a){return g.getImageUrl(a)};var p=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=p.apply(this,arguments);a.getImageFromBundles=function(a){return g.getImageUrl(a)};return a};
+"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var m=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),q=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",m);document.body.removeChild(c);document.body.removeChild(f);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
+!0;q.apply(this,arguments)};var b=k.editor.graph,e=b.container;e.style.overflow="hidden";this.lightboxChrome?(e.style.border="1px solid #c0c0c0",e.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(c.style.display="none",f.style.display="none");var g=this;b.getImageFromBundles=function(a){return g.getImageUrl(a)};var p=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=p.apply(this,arguments);a.getImageFromBundles=function(a){return g.getImageUrl(a)};return a};
this.graphConfig.move&&(b.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(e.style,"border-radius","4px"),e.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(e.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(e.style,"transition","all .25s ease-in-out"));this.addClickHandler(b,k);window.setTimeout(mxUtils.bind(this,function(){e.style.outline="none";
e.style.zIndex=this.lightboxZIndex;f.style.zIndex=this.lightboxZIndex;document.body.appendChild(e);document.body.appendChild(f);k.setFileData(this.xml);mxUtils.setPrefixedStyle(e.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(e.style.position="absolute",e.style.display="block",e.style.left=
a.x+"px",e.style.top=a.y+"px",e.style.width=document.body.clientWidth-80+"px",e.style.height=document.body.clientHeight-80+"px",e.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(b,this.graph);mxEvent.addListener(c,"click",function(){k.destroy()})}),0);return k};
@@ -3873,9 +3875,9 @@ GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassNam
GraphViewer.createViewerForElement=function(a,c){var f=a.getAttribute("data-mxgraph");if(null!=f){var d=JSON.parse(f),k=function(f){f=mxUtils.parseXml(f);f=new GraphViewer(a,f.documentElement,d);null!=c&&c(f)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}};
GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(c){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,c,f){if(null!=GraphViewer.cachedUrls[a])c(GraphViewer.cachedUrls[a]);else{var d=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){c(null!=d.getText?d.getText():d.responseText)};d.onerror=f;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},c=function(f,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function n(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=
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},c=function(f,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached=
new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==n(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 l=!1,m=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(m))};a(m);var p,q,E,G,F=function(){if((E=b.offsetWidth)!=p||(G=b.offsetHeight)!=q)l=!0,p=E,q=G;g()},I=function(a,b,c){a.attachEvent?
+b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var l=!1,n=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(n))};a(n);var p,q,E,G,F=function(){if((E=b.offsetWidth)!=p||(G=b.offsetHeight)!=q)l=!0,p=E,q=G;g()},I=function(a,b,c){a.attachEvent?
a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",F);I(f,"scroll",F)}var b=function(){GraphViewer.resizeSensorEnabled&&d()},e=Object.prototype.toString.call(f),g="[object Array]"===e||"[object NodeList]"===e||"[object HTMLCollection]"===e||"undefined"!==typeof jQuery&&f instanceof jQuery||"undefined"!==typeof Elements&&f instanceof Elements;if(g)for(var e=0,p=f.length;e<p;e++)q(f[e],b);else q(f,b);this.detach=function(){if(g)for(var a=0,b=f.length;a<b;a++)c.detach(f[a]);else c.detach(f)}};
c.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=c})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 0fe92efc..a62dd213 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -188,16 +188,16 @@ newSeed:function(){return U.newSeed()}}}();
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");
-window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";
-window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";
-window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
-window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
+window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";
+window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";
+window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";
+window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskadi",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
he:"עברית",ar:"العربية",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net",b=a.length-c.length,c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
-if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");
+if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");"viewer.diagrams.net"==window.location.hostname&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");
(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"4.2.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&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:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&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.")&&
@@ -2149,12 +2149,12 @@ Editor.prototype.setFilename=function(a){this.filename=a};
Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,f){c.undoableEditHappened(f.getProperty("edit"))};var f=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,c){var f=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<f.length){a.getModel();for(var k=[],b=0;b<
f.length;b++)null!=a.view.getState(f[b])&&k.push(f[b]);a.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,f);c.addListener(mxEvent.REDO,f);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,c,f,d,k,n,q,b,e,g,p){var m=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(m=80);f+=m;d+=m;var l=f,v=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var y=t.height,x=Math.max(1,Math.round((t.width-f-64)/2)),D=Math.max(1,Math.round((y-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,y-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=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";x+=t.x;D+=t.y;k&&document.body.appendChild(this.bg);var A=a.createDiv(e?"geTransDialog":
-"geDialog");k=this.getPosition(x,D,f,d);x=k.x;D=k.y;A.style.width=f+"px";A.style.height=d+"px";A.style.left=x+"px";A.style.top=D+"px";A.style.zIndex=this.zIndex;A.appendChild(c);document.body.appendChild(A);!b&&c.clientHeight>A.clientHeight-64&&(c.style.overflowY="auto");if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=D+14+"px",n.style.left=x+f+38-m+"px",n.style.zIndex=
-this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=n,!p)){var C=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){C=!0}),null,mxUtils.bind(this,function(b){C&&(a.hideDialog(!0),C=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g();null!=e&&(l=f=e.w,v=d=e.h)}e=mxUtils.getDocumentSize();y=e.height;this.bg.style.height=y+"px";x=Math.max(1,Math.round((e.width-f-64)/2));D=Math.max(1,
-Math.round((y-d-a.footerHeight)/3));f=null!=document.body?Math.min(l,document.body.scrollWidth-64):l;d=Math.min(v,y-64);e=this.getPosition(x,D,f,d);x=e.x;D=e.y;A.style.left=x+"px";A.style.top=D+"px";A.style.width=f+"px";A.style.height=d+"px";!b&&c.clientHeight>A.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=x+f+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
-A;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,c,f,d,k,m,q,b,e,g,p){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);f+=n;d+=n;var l=f,x=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var y=t.height,v=Math.max(1,Math.round((t.width-f-64)/2)),D=Math.max(1,Math.round((y-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,y-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=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";v+=t.x;D+=t.y;k&&document.body.appendChild(this.bg);var z=a.createDiv(e?"geTransDialog":
+"geDialog");k=this.getPosition(v,D,f,d);v=k.x;D=k.y;z.style.width=f+"px";z.style.height=d+"px";z.style.left=v+"px";z.style.top=D+"px";z.style.zIndex=this.zIndex;z.appendChild(c);document.body.appendChild(z);!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=D+14+"px",m.style.left=v+f+38-n+"px",m.style.zIndex=
+this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!p)){var C=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){C=!0}),null,mxUtils.bind(this,function(b){C&&(a.hideDialog(!0),C=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g();null!=e&&(l=f=e.w,x=d=e.h)}e=mxUtils.getDocumentSize();y=e.height;this.bg.style.height=y+"px";v=Math.max(1,Math.round((e.width-f-64)/2));D=Math.max(1,
+Math.round((y-d-a.footerHeight)/3));f=null!=document.body?Math.min(l,document.body.scrollWidth-64):l;d=Math.min(x,y-64);e=this.getPosition(v,D,f,d);v=e.x;D=e.y;z.style.left=v+"px";z.style.top=D+"px";z.style.width=f+"px";z.style.height=d+"px";!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=v+f+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
+z;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -2163,47 +2163,47 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,c,f,d,k,n,q,b,e,g,p){e=null!=e?e:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var l=document.createElement("div");l.style.padding="0px";l.style.margin="0px";l.style.fontSize="18px";l.style.paddingBottom="16px";l.style.marginBottom="10px";l.style.borderBottom="1px solid #c0c0c0";l.style.color="gray";l.style.whiteSpace="nowrap";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,c);l.setAttribute("title",c);m.appendChild(l)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=f;m.appendChild(c);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=n&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();n()}),c.className="geBtn",f.appendChild(c),f.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=p&&p()}),g.className="geBtn",f.appendChild(g));var v=mxUtils.button(d,function(){e&&a.hideDialog();null!=k&&k()});
-v.className="geBtn";f.appendChild(v);null!=q&&(d=mxUtils.button(q,function(){e&&a.hideDialog();null!=b&&b()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){v.focus()};m.appendChild(f);this.container=m},PrintDialog=function(a,c){this.create(a,c)};
-PrintDialog.prototype.create=function(a){function c(a){var e=b.checked||g.checked,d=parseInt(m.value)/100;isNaN(d)&&(d=1,m.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,l=1/f.pageScale;if(e){var n=b.checked?1:parseInt(p.value);isNaN(n)||(l=mxUtils.getScaleForPageCount(n,f,c))}f.getGraphBounds();var k=n=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);l*=d;!e&&f.pageVisible?(d=f.getPageLayout(),n-=d.x*c.width,k-=d.y*c.height):
-e=!0;e=PrintDialog.createPrintPreview(f,l,c,0,n,k,e);e.open();a&&PrintDialog.printPreview(e)}var f=a.editor.graph,d,k,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var b=document.createElement("input");b.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(b);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
+var ErrorDialog=function(a,c,f,d,k,m,q,b,e,g,p){e=null!=e?e:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var l=document.createElement("div");l.style.padding="0px";l.style.margin="0px";l.style.fontSize="18px";l.style.paddingBottom="16px";l.style.marginBottom="10px";l.style.borderBottom="1px solid #c0c0c0";l.style.color="gray";l.style.whiteSpace="nowrap";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,c);l.setAttribute("title",c);n.appendChild(l)}c=
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=f;n.appendChild(c);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=m&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),c.className="geBtn",f.appendChild(c),f.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=p&&p()}),g.className="geBtn",f.appendChild(g));var x=mxUtils.button(d,function(){e&&a.hideDialog();null!=k&&k()});
+x.className="geBtn";f.appendChild(x);null!=q&&(d=mxUtils.button(q,function(){e&&a.hideDialog();null!=b&&b()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){x.focus()};n.appendChild(f);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
+PrintDialog.prototype.create=function(a){function c(a){var e=b.checked||g.checked,d=parseInt(n.value)/100;isNaN(d)&&(d=1,n.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,l=1/f.pageScale;if(e){var m=b.checked?1:parseInt(p.value);isNaN(m)||(l=mxUtils.getScaleForPageCount(m,f,c))}f.getGraphBounds();var k=m=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);l*=d;!e&&f.pageVisible?(d=f.getPageLayout(),m-=d.x*c.width,k-=d.y*c.height):
+e=!0;e=PrintDialog.createPrintPreview(f,l,c,0,m,k,e);e.open();a&&PrintDialog.printPreview(e)}var f=a.editor.graph,d,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var b=document.createElement("input");b.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(b);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
k.appendChild(e);mxEvent.addListener(e,"click",function(a){b.checked=!b.checked;g.checked=!b.checked;mxEvent.consume(a)});mxEvent.addListener(b,"change",function(){g.checked=!b.checked});d.appendChild(k);q.appendChild(d);d=d.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);e=document.createElement("span");mxUtils.write(e," "+mxResources.get("posterPrint")+":");k.appendChild(e);mxEvent.addListener(e,
"click",function(a){g.checked=!g.checked;b.checked=!g.checked;mxEvent.consume(a)});d.appendChild(k);var p=document.createElement("input");p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.setAttribute("size","4");p.setAttribute("disabled","disabled");p.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(p);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);q.appendChild(d);mxEvent.addListener(g,"change",
-function(){g.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");b.checked=!g.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";k.appendChild(m);d.appendChild(k);q.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
+function(){g.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");b.checked=!g.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";k.appendChild(n);d.appendChild(k);q.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
k.style.paddingTop="20px";k.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&k.appendChild(e);if(PrintDialog.previewEnabled){var l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});l.className="geBtn";k.appendChild(l)}l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});l.className="geBtn gePrimaryBtn";k.appendChild(l);a.editor.cancelFirst||
-k.appendChild(e);d.appendChild(k);q.appendChild(d);n.appendChild(q);this.container=n};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(f){}};
-PrintDialog.createPrintPreview=function(a,c,f,d,k,n,q){c=new mxPrintPreview(a,c,f,d,k,n);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var b=c.writeHead;c.writeHead=function(a){b.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c};
+k.appendChild(e);d.appendChild(k);q.appendChild(d);m.appendChild(q);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(f){}};
+PrintDialog.createPrintPreview=function(a,c,f,d,k,m,q){c=new mxPrintPreview(a,c,f,d,k,m);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var b=c.writeHead;c.writeHead=function(a){b.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function c(){null==p||p==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=p,g.style.backgroundImage="")}function f(){null==v?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(l.setAttribute("title",v.src),l.style.fontSize="11px",l.innerHTML=mxUtils.htmlEntities(v.src.substring(0,42))+"...")}var d=a.editor.graph,k,
-n,q=document.createElement("table");q.style.width="100%";q.style.height="100%";var b=document.createElement("tbody");k=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var e=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);b.appendChild(k);k=document.createElement("tr");
-n=document.createElement("td");mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="18px";g.style.height="18px";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var p=d.background;c();mxEvent.addListener(g,"click",function(b){a.pickColor(p||"none",function(a){p=
-a;c()});mxEvent.consume(b)});n.appendChild(g);mxUtils.write(n,mxResources.get("gridSize")+":");var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.style.width="40px";m.style.marginLeft="6px";m.value=d.getGridSize();n.appendChild(m);mxEvent.addListener(m,"change",function(){var a=parseInt(m.value);m.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(n);b.appendChild(k);k=document.createElement("tr");n=document.createElement("td");mxUtils.write(n,
-mxResources.get("image")+":");k.appendChild(n);n=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var v=d.backgroundImage;mxEvent.addListener(l,"click",function(b){a.showBackgroundImageDialog(function(a,b){b||(v=a,f())},v);mxEvent.consume(b)});f();n.appendChild(l);k.appendChild(n);b.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align",
-"right");var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&n.appendChild(t);var y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(m.value);isNaN(b)||d.gridSize===b||d.setGridSize(b);b=new ChangePageSetup(a,p,v,e.get());b.ignoreColor=d.background==p;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=v?v.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==
-b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||d.model.execute(b)});y.className="geBtn gePrimaryBtn";n.appendChild(y);a.editor.cancelFirst||n.appendChild(t);k.appendChild(n);b.appendChild(k);q.appendChild(b);this.container=q};
-PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function k(a,d,c){if(c||m!=document.activeElement&&l!=document.activeElement){a=!1;for(d=0;d<t.length;d++)c=t[d],A?"custom"==c.key&&(b.value=c.key,A=!1):null!=c.format&&("a4"==c.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==c.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==c.format.width&&
-f.height==c.format.height?(b.value=c.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):f.width==c.format.height&&f.height==c.format.width&&(b.value=c.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(e.style.display="",p.style.display="none"):(m.value=f.width/100,l.value=f.height/100,n.setAttribute("checked","checked"),
-b.value="custom",e.style.display="none",p.style.display="")}}c="format-"+c;var n=document.createElement("input");n.setAttribute("name",c);n.setAttribute("type","radio");n.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",c);q.setAttribute("type","radio");q.setAttribute("value","landscape");var b=document.createElement("select");b.style.marginBottom="8px";b.style.width="202px";var e=document.createElement("div");e.style.marginLeft="4px";e.style.width="210px";
-e.style.height="24px";n.style.marginRight="6px";e.appendChild(n);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));e.appendChild(c);q.style.marginLeft="10px";q.style.marginRight="6px";e.appendChild(q);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));e.appendChild(g);var p=document.createElement("div");p.style.marginLeft="4px";p.style.width="210px";p.style.height="24px";var m=document.createElement("input");
-m.setAttribute("size","7");m.style.textAlign="right";p.appendChild(m);mxUtils.write(p," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";p.appendChild(l);mxUtils.write(p," in");e.style.display="none";p.style.display="none";for(var v={},t=PageSetupDialog.getFormats(),y=0;y<t.length;y++){var x=t[y];v[x.key]=x;var D=document.createElement("option");D.setAttribute("value",x.key);mxUtils.write(D,x.title);b.appendChild(D)}var A=!1;k();a.appendChild(b);mxUtils.br(a);
-a.appendChild(e);a.appendChild(p);var C=f,z=function(a,c){var g=v[b.value];null!=g.format?(m.value=g.format.width/100,l.value=g.format.height/100,p.style.display="none",e.style.display=""):(e.style.display="none",p.style.display="");g=parseFloat(m.value);if(isNaN(g)||0>=g)m.value=f.width/100;g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)),Math.floor(100*parseFloat(l.value)));"custom"!=b.value&&q.checked&&(g=new mxRectangle(0,0,
-g.height,g.width));c&&A||g.width==C.width&&g.height==C.height||(C=g,null!=d&&d(C))};mxEvent.addListener(c,"click",function(a){n.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){q.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(m,"blur",z);mxEvent.addListener(m,"click",z);mxEvent.addListener(l,"blur",z);mxEvent.addListener(l,"click",z);mxEvent.addListener(q,"change",z);mxEvent.addListener(n,"change",z);mxEvent.addListener(b,"change",function(a){A="custom"==b.value;
-z(a,!0)});z();return{set:function(a){f=a;k(null,null,!0)},get:function(){return C},widthInput:m,heightInput:l}};
+var PageSetupDialog=function(a){function c(){null==p||p==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=p,g.style.backgroundImage="")}function f(){null==x?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(l.setAttribute("title",x.src),l.style.fontSize="11px",l.innerHTML=mxUtils.htmlEntities(x.src.substring(0,42))+"...")}var d=a.editor.graph,k,
+m,q=document.createElement("table");q.style.width="100%";q.style.height="100%";var b=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var e=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");
+m=document.createElement("td");mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="18px";g.style.height="18px";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var p=d.background;c();mxEvent.addListener(g,"click",function(b){a.pickColor(p||"none",function(a){p=
+a;c()});mxEvent.consume(b)});m.appendChild(g);mxUtils.write(m,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=d.getGridSize();m.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,
+mxResources.get("image")+":");k.appendChild(m);m=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var x=d.backgroundImage;mxEvent.addListener(l,"click",function(b){a.showBackgroundImageDialog(function(a,b){b||(x=a,f())},x);mxEvent.consume(b)});f();m.appendChild(l);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align",
+"right");var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);var y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||d.gridSize===b||d.setGridSize(b);b=new ChangePageSetup(a,p,x,e.get());b.ignoreColor=d.background==p;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=x?x.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==
+b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||d.model.execute(b)});y.className="geBtn gePrimaryBtn";m.appendChild(y);a.editor.cancelFirst||m.appendChild(t);k.appendChild(m);b.appendChild(k);q.appendChild(b);this.container=q};
+PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function k(a,d,c){if(c||n!=document.activeElement&&l!=document.activeElement){a=!1;for(d=0;d<t.length;d++)c=t[d],z?"custom"==c.key&&(b.value=c.key,z=!1):null!=c.format&&("a4"==c.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==c.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==c.format.width&&
+f.height==c.format.height?(b.value=c.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):f.width==c.format.height&&f.height==c.format.width&&(b.value=c.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(e.style.display="",p.style.display="none"):(n.value=f.width/100,l.value=f.height/100,m.setAttribute("checked","checked"),
+b.value="custom",e.style.display="none",p.style.display="")}}c="format-"+c;var m=document.createElement("input");m.setAttribute("name",c);m.setAttribute("type","radio");m.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",c);q.setAttribute("type","radio");q.setAttribute("value","landscape");var b=document.createElement("select");b.style.marginBottom="8px";b.style.width="202px";var e=document.createElement("div");e.style.marginLeft="4px";e.style.width="210px";
+e.style.height="24px";m.style.marginRight="6px";e.appendChild(m);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));e.appendChild(c);q.style.marginLeft="10px";q.style.marginRight="6px";e.appendChild(q);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));e.appendChild(g);var p=document.createElement("div");p.style.marginLeft="4px";p.style.width="210px";p.style.height="24px";var n=document.createElement("input");
+n.setAttribute("size","7");n.style.textAlign="right";p.appendChild(n);mxUtils.write(p," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";p.appendChild(l);mxUtils.write(p," in");e.style.display="none";p.style.display="none";for(var x={},t=PageSetupDialog.getFormats(),y=0;y<t.length;y++){var v=t[y];x[v.key]=v;var D=document.createElement("option");D.setAttribute("value",v.key);mxUtils.write(D,v.title);b.appendChild(D)}var z=!1;k();a.appendChild(b);mxUtils.br(a);
+a.appendChild(e);a.appendChild(p);var C=f,A=function(a,c){var g=x[b.value];null!=g.format?(n.value=g.format.width/100,l.value=g.format.height/100,p.style.display="none",e.style.display=""):(e.style.display="none",p.style.display="");g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=f.width/100;g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(l.value)));"custom"!=b.value&&q.checked&&(g=new mxRectangle(0,0,
+g.height,g.width));c&&z||g.width==C.width&&g.height==C.height||(C=g,null!=d&&d(C))};mxEvent.addListener(c,"click",function(a){m.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){q.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",A);mxEvent.addListener(n,"click",A);mxEvent.addListener(l,"blur",A);mxEvent.addListener(l,"click",A);mxEvent.addListener(q,"change",A);mxEvent.addListener(m,"change",A);mxEvent.addListener(b,"change",function(a){z="custom"==b.value;
+A(a,!0)});A();return{set:function(a){f=a;k(null,null,!0)},get:function(){return C},widthInput:n,heightInput:l}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,c,f,d,k,n,q,b,e,g,p,m){e=null!=e?e:!0;var l,v,t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";l=document.createElement("tr");v=document.createElement("td");v.style.whiteSpace="nowrap";v.style.fontSize="10pt";v.style.width=p?"80px":"120px";mxUtils.write(v,(k||mxResources.get("filename"))+":");l.appendChild(v);var x=document.createElement("input");x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=m?m+
-"px":"180px";var D=mxUtils.button(f,function(){if(null==n||n(x.value))e&&a.hideDialog(),d(x.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
-mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=x,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};v=document.createElement("td");
-v.style.whiteSpace="nowrap";v.appendChild(x);l.appendChild(v);if(null!=k||null==q)y.appendChild(l),null!=p&&(null!=a.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),l.style.marginLeft="6px",l.style.width="74px",v.appendChild(l),x.style.width=null!=m?m-40+"px":"140px"),v.appendChild(FilenameDialog.createTypeHint(a,x,p)));null!=q&&(l=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(q),l.appendChild(v),y.appendChild(l));l=
-document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop="20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&v.appendChild(p);null!=b&&(m=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(b)}),m.className="geBtn",v.appendChild(m));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&D.click()});
-v.appendChild(D);a.editor.cancelFirst||v.appendChild(p);l.appendChild(v);y.appendChild(l);t.appendChild(y);this.container=t};FilenameDialog.filenameHelpLink=null;
+var FilenameDialog=function(a,c,f,d,k,m,q,b,e,g,p,n){e=null!=e?e:!0;var l,x,t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";l=document.createElement("tr");x=document.createElement("td");x.style.whiteSpace="nowrap";x.style.fontSize="10pt";x.style.width=p?"80px":"120px";mxUtils.write(x,(k||mxResources.get("filename"))+":");l.appendChild(x);var v=document.createElement("input");v.setAttribute("value",c||"");v.style.marginLeft="4px";v.style.width=null!=n?n+
+"px":"180px";var D=mxUtils.button(f,function(){if(null==m||m(v.value))e&&a.hideDialog(),d(v.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
+mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=v,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(v.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};x=document.createElement("td");
+x.style.whiteSpace="nowrap";x.appendChild(v);l.appendChild(x);if(null!=k||null==q)y.appendChild(l),null!=p&&(null!=a.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(a,v,a.editor.diagramFileTypes),l.style.marginLeft="6px",l.style.width="74px",x.appendChild(l),v.style.width=null!=n?n-40+"px":"140px"),x.appendChild(FilenameDialog.createTypeHint(a,v,p)));null!=q&&(l=document.createElement("tr"),x=document.createElement("td"),x.colSpan=2,x.appendChild(q),l.appendChild(x),y.appendChild(l));l=
+document.createElement("tr");x=document.createElement("td");x.colSpan=2;x.style.paddingTop="20px";x.style.whiteSpace="nowrap";x.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&x.appendChild(p);null!=b&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(b)}),n.className="geBtn",x.appendChild(n));mxEvent.addListener(v,"keypress",function(a){13==a.keyCode&&D.click()});
+x.appendChild(D);a.editor.cancelFirst||x.appendChild(p);l.appendChild(x);y.appendChild(l);t.appendChild(y);this.container=t};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(a,c,f){var d=document.createElement("img");d.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(d,70);var k=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var a=0;a<f.length;a++)if(0<f[a].ext.length&&c.value.toLowerCase().substring(c.value.length-f[a].ext.length-1)=="."+f[a].ext){d.setAttribute("src",
mxClient.imageBasePath+"/warning.png");d.setAttribute("title",mxResources.get(f[a].title));break}};mxEvent.addListener(c,"keyup",k);mxEvent.addListener(c,"change",k);mxEvent.addListener(d,"click",function(c){var f=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=f&&a.showError(null,f,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
mxEvent.consume(c)});k();return d};
-FilenameDialog.createFileTypes=function(a,c,f){var d=document.createElement("select");for(a=0;a<f.length;a++){var k=document.createElement("option");k.setAttribute("value",a);mxUtils.write(k,mxResources.get(f[a].description)+" (."+f[a].extension+")");d.appendChild(k)}mxEvent.addListener(d,"change",function(a){a=f[d.value].extension;var n=c.value.lastIndexOf(".");0<n?(a=f[d.value].extension,c.value=c.value.substring(0,n+1)+a):c.value=c.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
-a.initEvent("change",!1,!0),c.dispatchEvent(a)):c.fireEvent("onchange")});a=function(a){var n=c.value.lastIndexOf(".");a=0;if(0<n)for(var n=c.value.toLowerCase().substring(n+1),b=0;b<f.length;b++)if(n==f[b].extension){a=b;break}d.value=a};mxEvent.addListener(c,"change",a);mxEvent.addListener(c,"keyup",a);a();return d};
+FilenameDialog.createFileTypes=function(a,c,f){var d=document.createElement("select");for(a=0;a<f.length;a++){var k=document.createElement("option");k.setAttribute("value",a);mxUtils.write(k,mxResources.get(f[a].description)+" (."+f[a].extension+")");d.appendChild(k)}mxEvent.addListener(d,"change",function(a){a=f[d.value].extension;var m=c.value.lastIndexOf(".");0<m?(a=f[d.value].extension,c.value=c.value.substring(0,m+1)+a):c.value=c.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
+a.initEvent("change",!1,!0),c.dispatchEvent(a)):c.fireEvent("onchange")});a=function(a){var m=c.value.lastIndexOf(".");a=0;if(0<m)for(var m=c.value.toLowerCase().substring(m+1),b=0;b<f.length;b++)if(m==f[b].extension){a=b;break}d.value=a};mxEvent.addListener(c,"change",a);mxEvent.addListener(c,"keyup",a);a();return d};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var e=a.container.firstChild;null!=e&&e.nodeType!=mxConstants.NODETYPE_ELEMENT;)e=e.nextSibling;null!=e&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),e.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,e),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(b){a.dblClick(b)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),
mxUtils.bind(this,function(b){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
@@ -2211,33 +2211,33 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
d="url("+this.gridImage+")";var f=e=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),e=1+f.x,f=1+f.y);c=-Math.round(c-mxUtils.mod(this.translate.x*this.scale-e,c))+"px "+-Math.round(c-mxUtils.mod(this.translate.y*this.scale-f,c))+"px"}e=a.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=c,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
b,a.container.className="geDiagramContainer geDiagramBackdrop",e.style.backgroundImage="none",e.style.backgroundColor=""):(a.container.className="geDiagramContainer",e.style.backgroundPosition=c,e.style.backgroundColor=b,e.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var e=this.gridSteps*b,d=[],c=1;c<this.gridSteps;c++){var f=c*b;d.push("M 0 "+f+" L "+e+" "+f+" M "+f+" 0 L "+f+" "+e)}return'<svg width="'+
e+'" height="'+e+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+e+'" height="'+e+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+e+" 0 L 0 0 0 "+e+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=
-this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+d,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+b,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,e){var d=this.view.scale,c=this.view.translate,f=this.pageFormat,l=d*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;e=n.height;var t=
-new mxRectangle(d*c.x,d*c.y,f.width*l,f.height*l),k=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,x=a?Math.ceil(b/t.width)-1:0,q=n.x+b,A=n.y+e;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?k:x,e=0;e<=b;e++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(e+1)*t.height)),
-new mxPoint(Math.round(q),Math.round(n.y+(e+1)*t.height))]:[new mxPoint(Math.round(n.x+(e+1)*t.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(e+1)*t.width),Math.round(A))];null!=a[e]?(a[e].points=d,a[e].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[e]=d)}for(e=b;e<a.length;e++)a[e].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+d,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+b,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,e){var d=this.view.scale,c=this.view.translate,f=this.pageFormat,l=d*this.pageScale,m=this.view.getBackgroundPageBounds();b=m.width;e=m.height;var t=
+new mxRectangle(d*c.x,d*c.y,f.width*l,f.height*l),k=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,v=a?Math.ceil(b/t.width)-1:0,q=m.x+b,z=m.y+e;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?k:v,e=0;e<=b;e++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(e+1)*t.height)),
+new mxPoint(Math.round(q),Math.round(m.y+(e+1)*t.height))]:[new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(z))];null!=a[e]?(a[e].points=d,a[e].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[e]=d)}for(e=b;e<a.length;e++)a[e].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,e){for(var d=0;d<b.length;d++){if(this.graph.isTableCell(b[d])||this.graph.isTableRow(b[d]))return!1;if(this.graph.getModel().isVertex(b[d])){var f=this.graph.getCellGeometry(b[d]);if(null!=f&&f.relative)return!1}}return c.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=f.apply(this,arguments);
a.intersects=mxUtils.bind(this,function(b,e){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,e=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,c=this.graph.pageScale,
f=d.width*c,d=d.height*c,c=Math.floor(Math.min(0,b)/f),l=Math.floor(Math.min(0,e)/d);return new mxRectangle(this.scale*(this.translate.x+c*f),this.scale*(this.translate.y+l*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-c)*f,this.scale*(Math.ceil(Math.max(1,e+a.height/this.scale)/d)-l)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&
-mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,e,d,c,f){var g=k.apply(this,arguments);null==f||f||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,e){var d,c=this.graph.model.getParent(a);
-if(b)return d=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(c)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isContainer(c)||this.graph.isPart(a));d=n.apply(this,arguments);if(this.graph.isTableCell(a)||this.graph.isTableRow(a))d=c,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(e.getEvent())||this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||
+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,b,e,d,c,f){var g=k.apply(this,arguments);null==f||f||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var m=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,e){var d,c=this.graph.model.getParent(a);
+if(b)return d=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(c)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isContainer(c)||this.graph.isPart(a));d=m.apply(this,arguments);if(this.graph.isTableCell(a)||this.graph.isTableRow(a))d=c,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(e.getEvent())||this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||
this.graph.isTableCell(a)&&this.graph.isCellSelected(c);return d};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),e=b.getParent(a),d=this.graph.view.getState(e),c=this.graph.isCellSelected(a);null!=d&&(b.isVertex(e)||b.isEdge(e));){var f=this.graph.isCellSelected(e),c=c||f;if(f||!c&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=e;e=b.getParent(e)}return a}})();EditorUi=function(a,c,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var d=this.editor.graph;d.lightbox=f;this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!d.standalone){this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,
function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=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?(c=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):d.panningHandler.usePopupTrigger=
-!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(c=d.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var n=d.graphHandler.start;d.graphHandler.start=function(){null!=x.hoverIcons&&x.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
+!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(c=d.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var m=d.graphHandler.start;d.graphHandler.start=function(){null!=v.hoverIcons&&v.hoverIcons.reset();m.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var q=!1,b=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,e){return q||b.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),
d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var e=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return e.apply(this,arguments)||q||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&
-(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.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 p=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return q||p.apply(this,arguments)};var m=!1,l=null,v=null,t=null,y=
-mxUtils.bind(this,function(){if(null!=this.toolbar&&m!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var c=0;c<t.length;c++)this.toolbar.container.appendChild(t[c]);this.toolbar.fontMenu=l;this.toolbar.sizeMenu=v}m=d.cellEditor.isContentEditing();
-l=a;v=e;t=b}}),x=this,D=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){D.apply(this,arguments);y();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=x.toolbar)){var e=b.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));x.toolbar.setFontName(e);
-x.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var A=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){try{A.apply(this,arguments),y()}catch(B){x.handleError(B)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
+(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.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 p=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return q||p.apply(this,arguments)};var n=!1,l=null,x=null,t=null,y=
+mxUtils.bind(this,function(){if(null!=this.toolbar&&n!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var c=0;c<t.length;c++)this.toolbar.container.appendChild(t[c]);this.toolbar.fontMenu=l;this.toolbar.sizeMenu=x}n=d.cellEditor.isContentEditing();
+l=a;x=e;t=b}}),v=this,D=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){D.apply(this,arguments);y();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=v.toolbar)){var e=b.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));v.toolbar.setFontName(e);
+v.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var z=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){try{z.apply(this,arguments),y()}catch(B){v.handleError(B)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(u){}var C=d.fireMouseEvent;d.fireMouseEvent=function(a,b,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();C.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,e){this.menus.createPopupMenu(a,b,e)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
-function(){return keyHandler};var z="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var b=
-d.view.getState(a);if(null!=b){var e=a.clone();e.style="";var c=d.getCellStyle(e);a=[];var e=[],g;for(g in b.style)c[g]!=b.style[g]&&(a.push(b.style[g]),e.push(g));for(var f=d.getModel().getStyle(b.cell),p=null!=f?f.split(";"):[],f=0;f<p.length;f++){var l=p[f],m=l.indexOf("=");if(0<=m){g=l.substring(0,m);var u=l.substring(m+1);null!=c[g]&&"none"==u&&(a.push(u),e.push(g))}}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
+function(){return keyHandler};var A="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var b=
+d.view.getState(a);if(null!=b){var e=a.clone();e.style="";var c=d.getCellStyle(e);a=[];var e=[],g;for(g in b.style)c[g]!=b.style[g]&&(a.push(b.style[g]),e.push(g));for(var f=d.getModel().getStyle(b.cell),p=null!=f?f.split(";"):[],f=0;f<p.length;f++){var l=p[f],n=l.indexOf("=");if(0<=n){g=l.substring(0,n);var u=l.substring(n+1);null!=c[g]&&"none"==u&&(a.push(u),e.push(g))}}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
e,"values",a,"cells",[b.cell]))}}catch(Y){this.handleError(Y)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),I=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
-["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<I.length;a++)for(c=0;c<I[a].length;c++)z.push(I[a][c]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(z,E[a])&&z.push(E[a]);var J=function(a,b,e){e=null!=e?e:d.getModel();e.beginUpdate();try{for(var c=0;c<a.length;c++){var g=a[c],f;if(b)f=["fontSize","fontFamily","fontColor"];else{var p=e.getStyle(g),l=null!=p?p.split(";"):[];f=z.slice();for(var m=0;m<l.length;m++){var u=l[m],B=u.indexOf("=");if(0<=B){var t=
-u.substring(0,B),K=mxUtils.indexOf(f,t);0<=K&&f.splice(K,1);for(var n=0;n<I.length;n++){var k=I[n];if(0<=mxUtils.indexOf(k,t))for(var y=0;y<k.length;y++){var v=mxUtils.indexOf(f,k[y]);0<=v&&f.splice(v,1)}}}}}for(var x=e.isEdge(g),q=x?d.currentEdgeStyle:d.currentVertexStyle,D=e.getStyle(g),m=0;m<f.length;m++){var t=f[m],A=q[t];null==A||"shape"==t&&!x||x&&!(0>mxUtils.indexOf(E,t))||(D=mxUtils.setStyle(D,t,A))}e.setStyle(g,D)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,b){J(b.getProperty("cells"))});
+["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<I.length;a++)for(c=0;c<I[a].length;c++)A.push(I[a][c]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(A,E[a])&&A.push(E[a]);var J=function(a,b,e){e=null!=e?e:d.getModel();e.beginUpdate();try{for(var c=0;c<a.length;c++){var g=a[c],f;if(b)f=["fontSize","fontFamily","fontColor"];else{var p=e.getStyle(g),l=null!=p?p.split(";"):[];f=A.slice();for(var n=0;n<l.length;n++){var u=l[n],B=u.indexOf("=");if(0<=B){var t=
+u.substring(0,B),K=mxUtils.indexOf(f,t);0<=K&&f.splice(K,1);for(var m=0;m<I.length;m++){var k=I[m];if(0<=mxUtils.indexOf(k,t))for(var y=0;y<k.length;y++){var x=mxUtils.indexOf(f,k[y]);0<=x&&f.splice(x,1)}}}}}for(var v=e.isEdge(g),q=v?d.currentEdgeStyle:d.currentVertexStyle,D=e.getStyle(g),n=0;n<f.length;n++){var t=f[n],z=q[t];null==z||"shape"==t&&!v||v&&!(0>mxUtils.indexOf(E,t))||(D=mxUtils.setStyle(D,t,z))}e.setStyle(g,D)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,b){J(b.getProperty("cells"))});
d.addListener("textInserted",function(a,b){J(b.getProperty("cells"),!0)});this.insertHandler=J;d.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var e=[b.getProperty("cell")];b.getProperty("terminalInserted")&&e.push(b.getProperty("terminal"));J(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var e=b.getProperty("cells"),c=!1,g=!1;if(0<e.length)for(var f=0;f<e.length&&(c=d.getModel().isVertex(e[f])||c,!(g=d.getModel().isEdge(e[f])||g)||!c);f++);else g=c=!0;for(var e=
-b.getProperty("keys"),p=b.getProperty("values"),f=0;f<e.length;f++){var l=0<=mxUtils.indexOf(G,e[f]);if("strokeColor"!=e[f]||null!=p[f]&&"none"!=p[f])if(0<=mxUtils.indexOf(E,e[f]))g||0<=mxUtils.indexOf(F,e[f])?null==p[f]?delete d.currentEdgeStyle[e[f]]:d.currentEdgeStyle[e[f]]=p[f]:c&&0<=mxUtils.indexOf(z,e[f])&&(null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=p[f]);else if(0<=mxUtils.indexOf(z,e[f])){if(c||l)null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=
+b.getProperty("keys"),p=b.getProperty("values"),f=0;f<e.length;f++){var l=0<=mxUtils.indexOf(G,e[f]);if("strokeColor"!=e[f]||null!=p[f]&&"none"!=p[f])if(0<=mxUtils.indexOf(E,e[f]))g||0<=mxUtils.indexOf(F,e[f])?null==p[f]?delete d.currentEdgeStyle[e[f]]:d.currentEdgeStyle[e[f]]=p[f]:c&&0<=mxUtils.indexOf(A,e[f])&&(null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=p[f]);else if(0<=mxUtils.indexOf(A,e[f])){if(c||l)null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=
p[f];if(g||l||0<=mxUtils.indexOf(F,e[f]))null==p[f]?delete d.currentEdgeStyle[e[f]]:d.currentEdgeStyle[e[f]]=p[f]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,
@@ -2251,13 +2251,13 @@ EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"
"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var c=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){c.apply(this,
arguments);f.updateActionStates()};a.editLink=f.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,c=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){"mouseDown"==d.getProperty("eventName")&&c.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));var f=
-a.dblClick;a.dblClick=function(a,d){if(this.isEnabled())if(null!=d||null==c.sidebar||mxEvent.isShiftDown(a))f.apply(this,arguments);else{var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));c.showShapePicker(b.x,b.y)}};if(null!=this.hoverIcons){var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(d,f,b){var e=b.getEvent();mxEvent.isControlDown(e)||mxEvent.isShiftDown(e)?
-k.apply(this,arguments):this.graph.connectVertex(d.cell,f,this.graph.defaultEdgeLength,e,null,null,mxUtils.bind(this,function(e,f,m){e=a.getCompositeParent(d.cell);for(f=a.getCellGeometry(e);null!=e&&a.model.isVertex(e)&&null!=f&&f.relative;)cell=e,e=a.model.getParent(cell),f=a.getCellGeometry(e);c.showShapePicker(b.getGraphX(),b.getGraphY(),e,mxUtils.bind(this,function(a){m(a)}))}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,e,this)}))}}};
-EditorUi.prototype.showShapePicker=function(a,c,f,d){var k=this.getCellsForShapePicker(f);if(null!=k&&0<k.length){var n=this,q=this.editor.graph,b=document.createElement("div"),e=null!=f?q.copyStyle(f):null;b.className="geToolbarContainer geSidebarContainer geSidebar";b.style.cssText="position:absolute;left:"+(a-22)+"px;top:"+(c-22)+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";null!=q.background&&q.background!=mxConstants.NONE&&
-(b.style.backgroundColor=q.background);q.container.appendChild(b);f=mxUtils.bind(this,function(g){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";b.appendChild(f);null!=e&&this.sidebar.graph.pasteStyle(e,[g]);n.insertHandler([g],""!=g.value,this.sidebar.graph.model);this.sidebar.createThumb([g],25,25,f,null,!0,!1,g.geometry.width,g.geometry.height);
-mxEvent.addListener(f,"click",function(){if(null!=d)d(g);else{g.geometry.x=q.snap(Math.round(a/q.view.scale)-q.view.translate.x-g.geometry.width/2);g.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-g.geometry.height/2);q.model.beginUpdate();try{q.addCell(g)}finally{q.model.endUpdate()}q.setSelectionCell(g);q.scrollCellToVisible(q.getSelectionCell());q.startEditingAtCell(g)}n.hideShapePicker()})});for(var g=0;g<k.length;g++)f(k[g]);q.tooltipHandler.hideTooltip();this.hideCurrentMenu();
+a.dblClick;a.dblClick=function(a,d){if(this.isEnabled())if(null!=d||null==c.sidebar||mxEvent.isShiftDown(a))f.apply(this,arguments);else{mxEvent.consume(a);var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));c.showShapePicker(b.x,b.y)}};if(null!=this.hoverIcons){var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(d,f,b){var e=b.getEvent();mxEvent.isControlDown(e)||
+mxEvent.isShiftDown(e)?k.apply(this,arguments):this.graph.connectVertex(d.cell,f,this.graph.defaultEdgeLength,e,null,null,mxUtils.bind(this,function(e,f,n){e=a.getCompositeParent(d.cell);f=a.getCellGeometry(e);for(b.consume();null!=e&&a.model.isVertex(e)&&null!=f&&f.relative;)cell=e,e=a.model.getParent(cell),f=a.getCellGeometry(e);c.showShapePicker(b.getGraphX(),b.getGraphY(),e,mxUtils.bind(this,function(a){n(a)}))}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,e,this)}))}}};
+EditorUi.prototype.showShapePicker=function(a,c,f,d){var k=this.getCellsForShapePicker(f);if(null!=k&&0<k.length){var m=this,q=this.editor.graph,b=document.createElement("div"),e=null!=f?q.copyStyle(f):null;b.className="geToolbarContainer geSidebarContainer geSidebar";b.style.cssText="position:absolute;left:"+(a-22)+"px;top:"+(c-22)+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";null!=q.background&&q.background!=mxConstants.NONE&&
+(b.style.backgroundColor=q.background);q.container.appendChild(b);f=mxUtils.bind(this,function(g){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";b.appendChild(f);null!=e&&this.sidebar.graph.pasteStyle(e,[g]);m.insertHandler([g],""!=g.value,this.sidebar.graph.model);this.sidebar.createThumb([g],25,25,f,null,!0,!1,g.geometry.width,g.geometry.height);
+mxEvent.addListener(f,"click",function(){if(null!=d)d(g);else{g.geometry.x=q.snap(Math.round(a/q.view.scale)-q.view.translate.x-g.geometry.width/2);g.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-g.geometry.height/2);q.model.beginUpdate();try{q.addCell(g)}finally{q.model.endUpdate()}q.setSelectionCell(g);q.scrollCellToVisible(q.getSelectionCell());q.startEditingAtCell(g)}m.hideShapePicker()})});for(var g=0;g<k.length;g++)f(k[g]);q.tooltipHandler.hideTooltip();this.hideCurrentMenu();
this.hideShapePicker();this.shapePickerCallback=d;this.shapePicker=b}};
-EditorUi.prototype.getCellsForShapePicker=function(a){var c=mxUtils.bind(this,function(a,d,c,n){return this.editor.graph.createVertex(null,null,n||"",0,0,d||120,c||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):c("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),c("whiteSpace=wrap;html=1;"),c("ellipse;whiteSpace=wrap;html=1;",120,80),c("rhombus;whiteSpace=wrap;html=1;",80,80),c("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;"),
+EditorUi.prototype.getCellsForShapePicker=function(a){var c=mxUtils.bind(this,function(a,d,c,m){return this.editor.graph.createVertex(null,null,m||"",0,0,d||120,c||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):c("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),c("whiteSpace=wrap;html=1;"),c("ellipse;whiteSpace=wrap;html=1;",120,80),c("rhombus;whiteSpace=wrap;html=1;",80,80),c("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;"),
c("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;",120,60),c("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),c("shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;",120,80),c("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",
80,100),c("triangle;whiteSpace=wrap;html=1;",60,80),c("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),c("shape=tape;whiteSpace=wrap;html=1;",120,100),c("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),c("shape=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;",60,80)]};
EditorUi.prototype.hideShapePicker=function(a){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,a||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};EditorUi.prototype.onKeyDown=function(a){var c=this.editor.graph;9!=a.which||!c.isEnabled()||mxEvent.isAltDown(a)||c.isEditing()&&mxEvent.isShiftDown(a)||(c.isEditing()?c.stopEditing(!1):c.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
@@ -2268,31 +2268,31 @@ EditorUi.prototype.getCssClassForMarker=function(a,c,f,d){return"flexArrow"==c?n
f==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==f?"geSprite geSprite-"+a+"openasync":"dash"==f?"geSprite geSprite-"+a+"dash":"cross"==f?"geSprite geSprite-"+a+"cross":"async"==f?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==f||"circlePlus"==f?"1"==d||"circle"==f?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==f?"geSprite geSprite-"+a+"erone":"ERmandOne"==
f?"geSprite geSprite-"+a+"eronetoone":"ERmany"==f?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==f?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==f?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==f?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,c=this.actions.get("paste"),f=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));f.setEnabled(c.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var c=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var c=c||d.getSelectionCells(),c=d.getExportableCells(d.model.getTopmostCells(c)),b={},e=d.createCellLookup(c),g=d.cloneCells(c,null,b),f=new mxGraphModel,m=f.getChildAt(f.getRoot(),
-0),l=0;l<g.length;l++){f.add(m,g[l]);var k=d.view.getState(c[l]);if(null!=k){var t=d.getCellGeometry(g[l]);null!=t&&t.relative&&!f.isEdge(c[l])&&null==e[mxObjectIdentity.get(f.getParent(c[l]))]&&(t.offset=null,t.relative=!1,t.x=k.x/k.view.scale-k.view.translate.x,t.y=k.y/k.view.scale-k.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(b,e),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return c};var f=mxClipboard.paste;mxClipboard.paste=function(d){var c=
+EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var c=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var c=c||d.getSelectionCells(),c=d.getExportableCells(d.model.getTopmostCells(c)),b={},e=d.createCellLookup(c),g=d.cloneCells(c,null,b),f=new mxGraphModel,n=f.getChildAt(f.getRoot(),
+0),l=0;l<g.length;l++){f.add(n,g[l]);var k=d.view.getState(c[l]);if(null!=k){var t=d.getCellGeometry(g[l]);null!=t&&t.relative&&!f.isEdge(c[l])&&null==e[mxObjectIdentity.get(f.getParent(c[l]))]&&(t.offset=null,t.relative=!1,t.x=k.x/k.view.scale-k.view.translate.x,t.y=k.y/k.view.scale-k.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(b,e),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return c};var f=mxClipboard.paste;mxClipboard.paste=function(d){var c=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):c=f.apply(this,arguments);a.updatePasteActionStates();return c};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};var k=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,c){k.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.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)};a.getPreferredPageSize=function(a,b,e){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,e,d,c){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;c=null!=c?c:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),p=a.view.translate,l=a.view.scale,m=mxRectangle.fromRectangle(g);
-m.x=m.x/l-p.x;m.y=m.y/l-p.y;m.width/=l;m.height/=l;var p=a.container.scrollTop,u=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var B=a.container.offsetWidth-t,t=a.container.offsetHeight-t;b=b?Math.max(.3,Math.min(e||1,B/m.width)):l;e=(B-b*m.width)/2/b;var L=0==this.lightboxVerticalDivider?0:(t-b*m.height)/this.lightboxVerticalDivider/b;f&&(e=Math.max(e,0),L=Math.max(L,0));if(f||g.width<B||g.height<t)a.view.scaleAndTranslate(b,
-Math.floor(e-m.x),Math.floor(L-m.y)),a.container.scrollTop=p*b/l,a.container.scrollLeft=u*b/l;else if(0!=d||0!=c)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/l),Math.floor(g.y+c/l))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
+this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,e){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,e,d,c){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;c=null!=c?c:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),p=a.view.translate,l=a.view.scale,n=mxRectangle.fromRectangle(g);
+n.x=n.x/l-p.x;n.y=n.y/l-p.y;n.width/=l;n.height/=l;var p=a.container.scrollTop,u=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var B=a.container.offsetWidth-t,t=a.container.offsetHeight-t;b=b?Math.max(.3,Math.min(e||1,B/n.width)):l;e=(B-b*n.width)/2/b;var L=0==this.lightboxVerticalDivider?0:(t-b*n.height)/this.lightboxVerticalDivider/b;f&&(e=Math.max(e,0),L=Math.max(L,0));if(f||g.width<B||g.height<t)a.view.scaleAndTranslate(b,
+Math.floor(e-n.x),Math.floor(L-n.y)),a.container.scrollTop=p*b/l,a.container.scrollLeft=u*b/l;else if(0!=d||0!=c)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/l),Math.floor(g.y+c/l))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
-this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var n=mxUtils.bind(this,function(){var b=
-mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var q=0,n=mxUtils.bind(this,function(a,b,e){q++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=e&&d.setAttribute("title",
-e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=k.backBtn&&n(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var b=n(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),
-e=document.createElement("div");e.style.display="inline-block";e.style.verticalAlign="top";e.style.fontFamily="Helvetica,Arial";e.style.marginTop="8px";e.style.fontSize="14px";e.style.color="#ffffff";this.chromelessToolbar.appendChild(e);var g=n(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(e.innerHTML="",mxUtils.write(e,
-mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});b.style.paddingLeft="0px";b.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",b.style.display="",e.style.display="inline-block"):(g.style.display="none",b.style.display="none",e.style.display="none");p()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",
-p)}n(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,
-mxResources.get("fit"));var l=null,v=null,t=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),a||200)}),y=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=v&&(window.clearTimeout(v),
-fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=n(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
-null}));var e=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){x.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(b){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var A=this.lightboxToolbarActions[m];n(A.fn,A.icon,A.tooltip)}null!=k.refreshBtn&&n(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
-window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(b){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,
+this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var b=
+mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var q=0,m=mxUtils.bind(this,function(a,b,e){q++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=e&&d.setAttribute("title",
+e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=k.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var b=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),
+e=document.createElement("div");e.style.display="inline-block";e.style.verticalAlign="top";e.style.fontFamily="Helvetica,Arial";e.style.marginTop="8px";e.style.fontSize="14px";e.style.color="#ffffff";this.chromelessToolbar.appendChild(e);var g=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(e.innerHTML="",mxUtils.write(e,
+mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});b.style.paddingLeft="0px";b.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",b.style.display="",e.style.display="inline-block"):(g.style.display="none",b.style.display="none",e.style.display="none");p()});this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",
+p)}m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,
+mxResources.get("fit"));var l=null,x=null,t=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=x&&(window.clearTimeout(x),fadeThead2=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;x=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";x=null}),600)}),a||200)}),y=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=x&&(window.clearTimeout(x),
+fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var v=m(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
+null}));var e=v.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){v.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(b){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(n=0;n<this.lightboxToolbarActions.length;n++){var z=this.lightboxToolbarActions[n];m(z.fn,z.icon,z.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
+window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(b){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,
function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
y(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():y(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
y(30)}));var C=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,e){this.startX=e.getGraphX();this.startY=e.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,e){mxEvent.isTouchEvent(e.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<C&&Math.abs(this.scrollTop-a.container.scrollTop)<C&&Math.abs(this.startX-e.getGraphX())<C&&Math.abs(this.startY-e.getGraphY())<
-C&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?t():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}z.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange=
+C&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?t():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var A=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}A.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange=
function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),e=this.getPagePadding(),d=this.getPageSize(),c=Math.ceil(2*e.x+b.width*d.width),g=Math.ceil(2*e.y+b.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=c||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,c,g);c=e.x-b.x*d.width;e=e.y-b.y*d.height;this.autoTranslate||this.view.translate.x==c&&this.view.translate.y==e?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=
b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(c,e),a.container.scrollLeft+=Math.round((c-b)*a.view.scale),a.container.scrollTop+=Math.round((e-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,J=null,u=null,K=null,B=function(b){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,
function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";G.style.transform=""},0)):(F.style.transform=
@@ -2324,19 +2324,19 @@ this.previousFormat=c);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.e
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousPageScale=d.pageScale;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};
EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),c=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var n=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,b){n.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),f=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var n=0;n<k.length;n++){var q=k[n];a.getModel().isEdge(q)&&(d=!0);a.getModel().isVertex(q)&&(f=!0);if(d&&f)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(n=
-0;n<k.length;n++)this.actions.get(k[n]).setEnabled(c);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(f);this.actions.get("wordWrap").setEnabled(f);this.actions.get("autosize").setEnabled(f);d=f&&1==
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),c=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var m=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,b){m.apply(this,arguments);d()};d()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),f=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var m=0;m<k.length;m++){var q=k[m];a.getModel().isEdge(q)&&(d=!0);a.getModel().isVertex(q)&&(f=!0);if(d&&f)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(m=
+0;m<k.length;m++)this.actions.get(k[m]).setEnabled(c);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(f);this.actions.get("wordWrap").setEnabled(f);this.actions.get("autosize").setEnabled(f);d=f&&1==
a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(c||null!=a.view.currentRoot);
this.actions.get("collapsible").setEnabled(f&&(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()));c=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(c);this.actions.get("collapse").setEnabled(c);
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);c=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(c);this.menus.get("insert").setEnabled(c);this.menus.get("direction").setEnabled(c&&f);this.menus.get("align").setEnabled(c&&
f&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(c&&f&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(c);this.actions.get("selectEdges").setEnabled(c);this.actions.get("selectAll").setEnabled(c);this.actions.get("selectNone").setEnabled(c);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var c=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),f=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth,d=c?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 n=Math.max(0,Math.min(this.hsplitPosition,f-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 b=0;if(null!=this.sidebarFooterContainer){var e=
-this.footerHeight+k,b=Math.max(0,Math.min(d-q-e,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=n+"px";this.sidebarFooterContainer.style.height=b+"px";this.sidebarFooterContainer.style.bottom=e+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=n+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var g=this.getDiagramContainerOffset(),
-p=null!=this.hsplit.parentNode?n+this.splitSize:0;this.diagramContainer.style.left=p+g.x+"px";this.diagramContainer.style.top=q+g.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=n+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=p+"px");c?(this.menubarContainer.style.width=f+"px",
-this.toolbarContainer.style.width=this.menubarContainer.style.width,c=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=c-b+"px",this.formatContainer.style.height=c+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,f-n-this.splitSize-e)+"px":f+"px",this.footerContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,f-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 b=0;if(null!=this.sidebarFooterContainer){var e=
+this.footerHeight+k,b=Math.max(0,Math.min(d-q-e,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=b+"px";this.sidebarFooterContainer.style.bottom=e+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var g=this.getDiagramContainerOffset(),
+p=null!=this.hsplit.parentNode?m+this.splitSize:0;this.diagramContainer.style.left=p+g.x+"px";this.diagramContainer.style.top=q+g.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=p+"px");c?(this.menubarContainer.style.width=f+"px",
+this.toolbarContainer.style.width=this.menubarContainer.style.width,c=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=c-b+"px",this.formatContainer.style.height=c+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,f-m-this.splitSize-e)+"px":f+"px",this.footerContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",b-=this.tabContainer.clientHeight),this.diagramContainer.style.height=b+"px",this.hsplit.style.height=b+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=e+"px",f=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,f=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
this.footerHeight+b+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+f+"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"));
@@ -2347,13 +2347,13 @@ 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 c=document.createElement("div");c.className=a;return c};
-EditorUi.prototype.addSplitHandler=function(a,c,f,d){function k(a){if(null!=q){var l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,b+(c?l.x-q.x:q.y-l.y)-f));mxEvent.consume(a);b!=p()&&(e=!0,g=null)}}function n(a){k(a);q=b=null}var q=null,b=null,e=!0,g=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var p=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+f-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){q=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));b=p();e=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!e&&this.hsplitClickEnabled){var b=null!=g?g-f:0;g=p();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,n)})};
-EditorUi.prototype.handleError=function(a,c,f,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=c){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(c,k,n,f,null,null,null,null,null,null,null,null,d?f:null)}else null!=f&&f()};
-EditorUi.prototype.showError=function(a,c,f,d,k,n,q,b,e,g,p,m,l){a=new ErrorDialog(this,a,c,f||mxResources.get("ok"),d,k,n,q,m,b,e);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(a.container,g||340,p||100+20*c,!0,!1,l);a.init()};EditorUi.prototype.showDialog=function(a,c,f,d,k,n,q,b,e,g){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,f,d,k,n,q,b,e,g);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,c,f,d){function k(a){if(null!=q){var l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,b+(c?l.x-q.x:q.y-l.y)-f));mxEvent.consume(a);b!=p()&&(e=!0,g=null)}}function m(a){k(a);q=b=null}var q=null,b=null,e=!0,g=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var p=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+f-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){q=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));b=p();e=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!e&&this.hsplitClickEnabled){var b=null!=g?g-f:0;g=p();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})};
+EditorUi.prototype.handleError=function(a,c,f,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=c){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(c,k,m,f,null,null,null,null,null,null,null,null,d?f:null)}else null!=f&&f()};
+EditorUi.prototype.showError=function(a,c,f,d,k,m,q,b,e,g,p,n,l){a=new ErrorDialog(this,a,c,f||mxResources.get("ok"),d,k,m,q,n,b,e);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(a.container,g||340,p||100+20*c,!0,!1,l);a.init()};EditorUi.prototype.showDialog=function(a,c,f,d,k,m,q,b,e,g){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,f,d,k,m,q,b,e,g);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,c){if(null!=this.dialogs&&0<this.dialogs.length){var f=this.dialogs.pop();0==f.close(a,c)?this.dialogs.push(f):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():
-(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var c=a.getSelectionCells(),f=new mxDictionary,d=[],k=0;k<c.length;k++){var n=a.isTableCell(c[k])?a.model.getParent(c[k]):c[k];null==n||f.get(n)||(f.put(n,!0),d.push(n))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(q){this.handleError(q)}};
-EditorUi.prototype.pickColor=function(a,c){var f=this.editor.graph,d=f.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,a||"none",function(a){f.cellEditor.restoreSelection(d);c(a)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(n.container,230,k,!0,!1);n.init()};
+(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var c=a.getSelectionCells(),f=new mxDictionary,d=[],k=0;k<c.length;k++){var m=a.isTableCell(c[k])?a.model.getParent(c[k]):c[k];null==m||f.get(m)||(f.put(m,!0),d.push(m))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(q){this.handleError(q)}};
+EditorUi.prototype.pickColor=function(a,c){var f=this.editor.graph,d=f.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){f.cellEditor.restoreSelection(d);c(a)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(m.container,230,k,!0,!1);m.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>f&&(c=a.substring(f,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(k){}return c};
EditorUi.prototype.extractGraphModelFromEvent=function(a){var c=null,f=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?f=a.getData("Text"):(f=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==f||0==f.length)&&(f=a.getData("text/plain"))),null!=f&&(f=Graph.zapGremlins(mxUtils.trim(f)),a=this.extractGraphModelFromHtml(f),null!=a&&(f=a))));null!=f&&this.isCompatibleString(f)&&
@@ -2361,18 +2361,18 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var c=null,f=null;null
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,c);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(c.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(c))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(c);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(f){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
EditorUi.prototype.executeLayout=function(a,c,f){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(d.getModel().endUpdate(),null!=f&&f())}}};
-EditorUi.prototype.showImageDialog=function(a,c,f,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),n=mxUtils.prompt(a,c);d.restoreSelection(k);if(null!=n&&0<n.length){var q=new Image;q.onload=function(){f(n,q.width,q.height)};q.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=n}else f(null)};EditorUi.prototype.showLinkDialog=function(a,c,f){a=new LinkDialog(this,a,c,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.showImageDialog=function(a,c,f,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),m=mxUtils.prompt(a,c);d.restoreSelection(k);if(null!=m&&0<m.length){var q=new Image;q.onload=function(){f(m,q.width,q.height)};q.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=m}else f(null)};EditorUi.prototype.showLinkDialog=function(a,c,f){a=new LinkDialog(this,a,c,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
EditorUi.prototype.showBackgroundImageDialog=function(a,c){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 f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=c?c.src:"");null!=f&&0<f.length?(c=new Image,c.onload=function(){a(new mxImage(f,c.width,c.height),!1)},c.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},c.src=f):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,c,f){mxUtils.confirm(a)?null!=c&&c():null!=f&&f()};
EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);c.border=20;mxEvent.addListener(window,"resize",function(){c.update()});this.addListener("pageFormatChanged",function(){c.update()});return c};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
EditorUi.prototype.createKeyHandler=function(a){function c(a,e,c){q.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(e=null!=e?e:1,c){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),g=0;g<b.length;g++)if(d.getModel().isVertex(b[g])&&d.isCellResizable(b[g])){var f=d.getCellGeometry(b[g]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-e):38==a?f.height=Math.max(0,f.height-e):39==a?f.width+=e:40==a&&(f.height+=e),d.getModel().setGeometry(b[g],f))}}finally{d.getModel().endUpdate()}}else{var p=
d.getSelectionCell(),f=d.model.getParent(p),b=null;1==d.getSelectionCount()&&d.model.isVertex(p)&&null!=d.layoutManager&&!d.isCellLocked(p)&&(b=d.layoutManager.getLayout(f));if(null!=b&&b.constructor==mxStackLayout)b=f.getIndex(p),37==a||38==a?d.model.add(f,p,Math.max(0,b-1)):39!=a&&40!=a||d.model.add(f,p,Math.min(d.model.getChildCount(f),b+1));else{b=d.getMovableCells(d.getSelectionCells());p=[];for(g=0;g<b.length;g++)f=d.getCurrentCellStyle(b[g]),"1"==mxUtils.getValue(f,"part","0")?(f=d.model.getParent(b[g]),
-d.model.isVertex(f)&&0>mxUtils.indexOf(b,f)&&p.push(f)):p.push(b[g]);0<p.length&&(b=f=0,37==a?f=-e:38==a?b=-e:39==a?f=e:40==a&&(b=e),d.moveCells(p,f,b))}}});null!=b&&window.clearTimeout(b);b=window.setTimeout(function(){if(0<q.length){d.getModel().beginUpdate();try{for(var a=0;a<q.length;a++)q[a]();q=[]}finally{d.getModel().endUpdate()}}},200)}var f=this,d=this.editor.graph,k=new mxKeyHandler(d),n=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
-mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],b=
+d.model.isVertex(f)&&0>mxUtils.indexOf(b,f)&&p.push(f)):p.push(b[g]);0<p.length&&(b=f=0,37==a?f=-e:38==a?b=-e:39==a?f=e:40==a&&(b=e),d.moveCells(p,f,b))}}});null!=b&&window.clearTimeout(b);b=window.setTimeout(function(){if(0<q.length){d.getModel().beginUpdate();try{for(var a=0;a<q.length;a++)q[a]();q=[]}finally{d.getModel().endUpdate()}}},200)}var f=this,d=this.editor.graph,k=new mxKeyHandler(d),m=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
+mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&m.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],b=
null,e={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},g=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var b=f.actions.get(f.altShiftActions[a.keyCode]);if(null!=b)return b.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return d.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:
function(){d.selectChildCell()};if(null!=e[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var b=d.connectVertex(d.getSelectionCell(),e[a.keyCode],d.defaultEdgeLength,a,!0);null!=b&&0<b.length&&(1==b.length&&d.model.isEdge(b[0])?d.setSelectionCell(d.model.getTerminal(b[0],!1)):d.setSelectionCell(b[b.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?
-function(){c(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return g.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,b,e,d){var c=this.actions.get(e);null!=c&&(e=function(){c.isEnabled()&&c.funct()},b?d?k.bindControlShiftKey(a,e):k.bindControlKey(a,e):d?k.bindShiftKey(a,e):k.bindKey(a,e))});var p=this,m=k.escape;k.escape=function(a){m.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});
+function(){c(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return g.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,b,e,d){var c=this.actions.get(e);null!=c&&(e=function(){c.isEnabled()&&c.funct()},b?d?k.bindControlShiftKey(a,e):k.bindControlKey(a,e):d?k.bindShiftKey(a,e):k.bindKey(a,e))});var p=this,n=k.escape;k.escape=function(a){n.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});
k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindShiftKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){p.ctrlEnter()}),k.bindAction(8,!1,"delete"),
k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(36,!1,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,
!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),
@@ -2384,30 +2384,30 @@ Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&(
mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(c){}})();
mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;
mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,c,f){return null};
-Graph=function(a,c,f,d,k,n){mxGraph.call(this,a,c,f,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=a.indexOf("/",c+2),0<c&&(this.domainUrl=a.substring(0,c)),c=a.lastIndexOf("/"),0<c&&(this.domainPathUrl=a.substring(0,c+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
+Graph=function(a,c,f,d,k,m){mxGraph.call(this,a,c,f,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=a.indexOf("/",c+2),0<c&&(this.domainUrl=a.substring(0,c)),c=a.lastIndexOf("/"),0<c&&(this.domainPathUrl=a.substring(0,c+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var q=null,b=null,e=null,g=null,p=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var c=d.getProperty("event"),f=c.getState();if(!mxEvent.isAltDown(c.getEvent())&&null!=f)if(this.model.isEdge(f.cell))if(q=new mxPoint(c.getGraphX(),c.getGraphY()),p=this.isCellSelected(f.cell),e=f,b=c,null!=f.text&&null!=f.text.boundingBox&&
-mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var m=this.selectionCellsHandler.getHandler(f.cell);null!=m&&null!=m.bends&&0<m.bends.length&&(g=m.getHandleForEvent(c))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(c.getEvent())&&(m=this.selectionCellsHandler.getHandler(f.cell),null==m||null==m.getHandleForEvent(c))){var u=new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);u.grow(mxEvent.isTouchEvent(c.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var l=this.model.getParent(f.cell),m=this.model.getParent(l);if(!this.isCellSelected(m)&&(mxUtils.intersects(u,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(m,0)!=l||mxUtils.intersects(u,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(u,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(l,0)!=f.cell||mxUtils.intersects(u,new mxRectangle(f.x+f.width-
-2,f.y,2,f.height)))&&(l=this.selectionCellsHandler.isHandled(m),this.selectCellForEvent(m,c.getEvent()),m=this.selectionCellsHandler.getHandler(m),null!=m)){var t=m.getHandleForEvent(c);null!=t&&(m.start(c.getGraphX(),c.getGraphY(),t),m.blockDelayedSelection=!l,c.consume())}}for(;!c.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(m=this.getActualStartSize(f.cell),l=this.view.scale,(0<m.x||0<m.width)&&mxUtils.intersects(u,
-new mxRectangle(f.x+(m.x-m.width-1)*l+(0==m.x?f.width:0),f.y,1,f.height))||(0<m.y||0<m.height)&&mxUtils.intersects(u,new mxRectangle(f.x,f.y+(m.y-m.height-1)*l+(0==m.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,c.getEvent()),m=this.selectionCellsHandler.getHandler(f.cell),null!=m&&(t=mxEvent.CUSTOM_HANDLE-m.customHandles.length+1,m.start(c.getGraphX(),c.getGraphY(),t),c.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(a,b){},
-mouseMove:mxUtils.bind(this,function(a,d){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(f=this.tolerance,null!=q&&null!=e&&null!=b){if(c=e,Math.abs(q.x-d.getGraphX())>f||Math.abs(q.y-d.getGraphY())>f){this.isCellSelected(c.cell)||this.selectCellForEvent(c.cell,d.getEvent());var m=this.selectionCellsHandler.getHandler(c.cell);if(null!=m&&null!=m.bends&&0<m.bends.length){f=
-m.getHandleForEvent(b);var u=this.view.getEdgeStyle(c),l=u==mxEdgeStyle.EntityRelation;p||g!=mxEvent.LABEL_HANDLE||(f=g);if(l&&0!=f&&f!=m.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=c.visibleSourceState||f==m.bends.length-1||null!=c.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=c.absolutePoints,null!=l&&(null==u&&null==f||u==mxEdgeStyle.OrthConnector)&&(f=
-g,null==f&&(f=new mxRectangle(q.x,q.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=m.bends.length-1:null!=u&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(c,q.x,q.y),f=null==u?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),m.start(d.getGraphX(),
-d.getGraphX(),f),g=q=b=e=null,p=!1,d.consume(),this.graphHandler.reset()}}}else if(c=d.getState(),null!=c){m=null;if(this.model.isEdge(c.cell)){if(f=new mxRectangle(d.getGraphX(),d.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=c.absolutePoints,null!=l)if(null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,d.getGraphX(),d.getGraphY()))m="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))m="pointer";else if(null!=
-c.visibleSourceState||null!=c.visibleTargetState)f=this.view.getEdgeStyle(c),m="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(f=mxUtils.findNearestSegment(c,d.getGraphX(),d.getGraphY()),f<l.length-1&&0<=f&&(m=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){f=new mxRectangle(d.getGraphX()-1,d.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(c.cell)&&(l=this.model.getParent(c.cell),u=this.model.getParent(l),
-!this.isCellSelected(u)))if(mxUtils.intersects(f,new mxRectangle(c.x-2,c.y,2,c.height))&&this.model.getChildAt(l,0)!=c.cell||mxUtils.intersects(f,new mxRectangle(c.x+c.width-2,c.y,2,c.height)))m="col-resize";else if(mxUtils.intersects(f,new mxRectangle(c.x,c.y-2,c.width,3))&&this.model.getChildAt(u,0)!=l||mxUtils.intersects(f,new mxRectangle(c.x,c.y+c.height-2,c.width,3)))m="row-resize";for(l=c;null==m&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var u=
-this.getActualStartSize(l.cell),t=this.view.scale;(0<u.x||0<u.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(u.x-u.width-1)*t+(0==u.x?l.width*t:0),l.y,1,l.height))?m="col-resize":(0<u.y||0<u.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(u.y-u.height-1)*t+(0==u.y?l.height:0),l.width,1))&&(m="row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=m&&c.setCursor(m)}}),mouseUp:mxUtils.bind(this,function(a,d){g=q=b=e=null})})}this.cellRenderer.getLabelValue=function(a){var b=
+mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var n=this.selectionCellsHandler.getHandler(f.cell);null!=n&&null!=n.bends&&0<n.bends.length&&(g=n.getHandleForEvent(c))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(c.getEvent())&&(n=this.selectionCellsHandler.getHandler(f.cell),null==n||null==n.getHandleForEvent(c))){var u=new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);u.grow(mxEvent.isTouchEvent(c.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var l=this.model.getParent(f.cell),n=this.model.getParent(l);if(!this.isCellSelected(n)&&(mxUtils.intersects(u,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(n,0)!=l||mxUtils.intersects(u,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(u,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(l,0)!=f.cell||mxUtils.intersects(u,new mxRectangle(f.x+f.width-
+2,f.y,2,f.height)))&&(l=this.selectionCellsHandler.isHandled(n),this.selectCellForEvent(n,c.getEvent()),n=this.selectionCellsHandler.getHandler(n),null!=n)){var t=n.getHandleForEvent(c);null!=t&&(n.start(c.getGraphX(),c.getGraphY(),t),n.blockDelayedSelection=!l,c.consume())}}for(;!c.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(n=this.getActualStartSize(f.cell),l=this.view.scale,(0<n.x||0<n.width)&&mxUtils.intersects(u,
+new mxRectangle(f.x+(n.x-n.width-1)*l+(0==n.x?f.width:0),f.y,1,f.height))||(0<n.y||0<n.height)&&mxUtils.intersects(u,new mxRectangle(f.x,f.y+(n.y-n.height-1)*l+(0==n.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,c.getEvent()),n=this.selectionCellsHandler.getHandler(f.cell),null!=n&&(t=mxEvent.CUSTOM_HANDLE-n.customHandles.length+1,n.start(c.getGraphX(),c.getGraphY(),t),c.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(a,b){},
+mouseMove:mxUtils.bind(this,function(a,d){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(f=this.tolerance,null!=q&&null!=e&&null!=b){if(c=e,Math.abs(q.x-d.getGraphX())>f||Math.abs(q.y-d.getGraphY())>f){this.isCellSelected(c.cell)||this.selectCellForEvent(c.cell,d.getEvent());var n=this.selectionCellsHandler.getHandler(c.cell);if(null!=n&&null!=n.bends&&0<n.bends.length){f=
+n.getHandleForEvent(b);var u=this.view.getEdgeStyle(c),l=u==mxEdgeStyle.EntityRelation;p||g!=mxEvent.LABEL_HANDLE||(f=g);if(l&&0!=f&&f!=n.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=c.visibleSourceState||f==n.bends.length-1||null!=c.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=c.absolutePoints,null!=l&&(null==u&&null==f||u==mxEdgeStyle.OrthConnector)&&(f=
+g,null==f&&(f=new mxRectangle(q.x,q.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=n.bends.length-1:null!=u&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(c,q.x,q.y),f=null==u?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),n.start(d.getGraphX(),
+d.getGraphX(),f),g=q=b=e=null,p=!1,d.consume(),this.graphHandler.reset()}}}else if(c=d.getState(),null!=c){n=null;if(this.model.isEdge(c.cell)){if(f=new mxRectangle(d.getGraphX(),d.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=c.absolutePoints,null!=l)if(null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,d.getGraphX(),d.getGraphY()))n="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))n="pointer";else if(null!=
+c.visibleSourceState||null!=c.visibleTargetState)f=this.view.getEdgeStyle(c),n="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(f=mxUtils.findNearestSegment(c,d.getGraphX(),d.getGraphY()),f<l.length-1&&0<=f&&(n=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){f=new mxRectangle(d.getGraphX()-1,d.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(c.cell)&&(l=this.model.getParent(c.cell),u=this.model.getParent(l),
+!this.isCellSelected(u)))if(mxUtils.intersects(f,new mxRectangle(c.x-2,c.y,2,c.height))&&this.model.getChildAt(l,0)!=c.cell||mxUtils.intersects(f,new mxRectangle(c.x+c.width-2,c.y,2,c.height)))n="col-resize";else if(mxUtils.intersects(f,new mxRectangle(c.x,c.y-2,c.width,3))&&this.model.getChildAt(u,0)!=l||mxUtils.intersects(f,new mxRectangle(c.x,c.y+c.height-2,c.width,3)))n="row-resize";for(l=c;null==n&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var u=
+this.getActualStartSize(l.cell),t=this.view.scale;(0<u.x||0<u.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(u.x-u.width-1)*t+(0==u.x?l.width*t:0),l.y,1,l.height))?n="col-resize":(0<u.y||0<u.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(u.y-u.height-1)*t+(0==u.y?l.height:0),l.width,1))&&(n="row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=n&&c.setCursor(n)}}),mouseUp:mxUtils.bind(this,function(a,d){g=q=b=e=null})})}this.cellRenderer.getLabelValue=function(a){var b=
mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};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,b){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],e=this.graph.pageFormat,d=this.graph.pageScale,c=e.width*d,e=e.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),
-p=0;p<g.width;p++)b.push(new mxRectangle(((g.x+p)*c+d.x)*f,(g.y*e+d.y)*f,c*f,e*f));for(p=1;p<g.height;p++)b.push(new mxRectangle((g.x*c+d.x)*f,((g.y+p)*e+d.y)*f,c*f,e*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;
+!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],e=this.graph.pageFormat,d=this.graph.pageScale,c=e.width*d,e=e.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),
+l=0;l<g.width;l++)b.push(new mxRectangle(((g.x+l)*c+d.x)*f,(g.y*e+d.y)*f,c*f,e*f));for(l=1;l<g.height;l++)b.push(new mxRectangle((g.x*c+d.x)*f,((g.y+l)*e+d.y)*f,c*f,e*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;
return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=l.apply(this,arguments),e=new mxDictionary,d=[],c=0;c<b.length;c++){var f=this.graph.isTableCell(a)&&this.graph.isTableCell(b[c])&&this.graph.isCellSelected(b[c])?this.graph.model.getParent(b[c]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[c])&&this.graph.isCellSelected(b[c])?b[c]:this.graph.getCompositeParent(b[c]);null==f||e.get(f)||(e.put(f,
-!0),d.push(f))}return d};var v=this.graphHandler.start;this.graphHandler.start=function(a,b,e,d){var c=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?c=!0:a=this.graph.model.getParent(a));c||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);
-this.getRubberband=function(){return t};var y=(new Date).getTime(),x=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var A=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&A.apply(this,arguments)};var C=this.isToggleEvent;this.isToggleEvent=function(a){return C.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var z=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return z.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
+!0),d.push(f))}return d};var x=this.graphHandler.start;this.graphHandler.start=function(a,b,e,d){var c=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?c=!0:a=this.graph.model.getParent(a));c||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);
+this.getRubberband=function(){return t};var y=(new Date).getTime(),v=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(y=(new Date).getTime(),v=0):v=(new Date).getTime()-y};var z=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<v||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&z.apply(this,arguments)};var C=this.isToggleEvent;this.isToggleEvent=function(a){return C.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return A.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=
function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return G.apply(this,arguments);var e=b?a.sourceState.cell:a.getCell();null!=e&&(e=this.getClickableLinkForCell(e),null!=e&&(this.isCustomLink(e)?this.customLinkClicked(e):this.openLink(e)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=
a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var F=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.apply(this,arguments)};this.selectRegion=function(a,b){var e=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(e,b);return e};this.getAllCells=function(a,
-b,e,d,c,f){f=null!=f?f:[];if(0<e||0<d){var g=this.getModel(),m=a+e,p=b+d;null==c&&(c=this.getCurrentRoot(),null==c&&(c=g.getRoot()));if(null!=c)for(var l=g.getChildCount(c),u=0;u<l;u++){var t=g.getChildAt(c,u),B=this.view.getState(t);if(null!=B&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(B.style,"locked","0")){var k=mxUtils.getValue(B.style,mxConstants.STYLE_ROTATION)||0;0!=k&&(B=mxUtils.getBoundingBox(B,k));(g.isEdge(t)||g.isVertex(t))&&B.x>=a&&B.y+B.height<=p&&B.y>=b&&B.x+B.width<=m&&f.push(t);
+b,e,d,c,f){f=null!=f?f:[];if(0<e||0<d){var g=this.getModel(),n=a+e,l=b+d;null==c&&(c=this.getCurrentRoot(),null==c&&(c=g.getRoot()));if(null!=c)for(var p=g.getChildCount(c),u=0;u<p;u++){var t=g.getChildAt(c,u),B=this.view.getState(t);if(null!=B&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(B.style,"locked","0")){var k=mxUtils.getValue(B.style,mxConstants.STYLE_ROTATION)||0;0!=k&&(B=mxUtils.getBoundingBox(B,k));(g.isEdge(t)||g.isVertex(t))&&B.x>=a&&B.y+B.height<=l&&B.y>=b&&B.x+B.width<=n&&f.push(t);
this.getAllCells(a,b,e,d,t,f)}}}return f};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,e){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var J=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==
b.getProperty("eventName")){var e=b.getProperty("event").getState();J=null==e||this.isSelectionEmpty()||this.isCellSelected(e.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var e=b.getProperty("event"),d=b.getProperty("cell");null==d?(e=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),t.start(e.x,e.y)):null!=J?this.addSelectionCells(J):1<this.getSelectionCount()&&this.isCellSelected(d)&&
this.removeSelectionCell(d);J=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var e=a.view.graph;return b&&(e.isCellSelected(a.cell)||e.isTableRow(a.cell)&&e.selectionCellsHandler.isHandled(e.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,
@@ -2421,21 +2421,21 @@ Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((
Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;
Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];
Graph.prototype.standalone=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,c=!0,n=null,q=mxUtils.bind(this,function(a){c=!0;n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),b=mxUtils.bind(this,function(a){c=c&&null!=n&&Math.abs(n.x-mxEvent.getClientX(a))<d&&Math.abs(n.y-mxEvent.getClientY(a))<d}),e=mxUtils.bind(this,function(b){if(c)for(var e=mxEvent.getSource(b);null!=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,c=!0,m=null,q=mxUtils.bind(this,function(a){c=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),b=mxUtils.bind(this,function(a){c=c&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<d&&Math.abs(m.y-mxEvent.getClientY(a))<d}),e=mxUtils.bind(this,function(b){if(c)for(var e=mxEvent.getSource(b);null!=
e&&e!=f.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,b);break}e=e.parentNode}});mxEvent.addGestureListeners(f.node,q,b,e);mxEvent.addListener(f.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getCells=function(a,c){a=null!=a?a:!0;c=null!=c?c:!0;var d=this.model;return d.filterDescendants(function(f){return a&&d.isVertex(f)||c&&d.isEdge(f)},d.getRoot())};Graph.prototype.getStartEditingCell=function(a,c){var d=this.getCellStyle(a),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(a)&&(!this.isSwimlane(a)||0==d)&&""==this.getLabel(a)&&
0<this.model.getChildCount(a)&&(a=this.model.getChildAt(a,0),d=this.getCellStyle(a),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(a)&&(!this.isSwimlane(a)||0==d)&&""==this.getLabel(a)&&0<this.model.getChildCount(a))for(d=0;d<this.model.getChildCount(a);d++){var f=this.model.getChildAt(a,d);if(this.isCellEditable(f)){a=f;break}}return a};Graph.prototype.copyStyle=function(a){var c=null;if(null!=a){c=mxUtils.clone(this.getCurrentCellStyle(a));a=this.model.getStyle(a);
a=null!=a?a.split(";"):[];for(var d=0;d<a.length;d++){var f=a[d],b=f.indexOf("=");if(0<=b){var e=f.substring(0,b),f=f.substring(b+1);null==c[e]&&f==mxConstants.NONE&&(c[e]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(a,c,f){f=null!=f?f:Graph.pasteStyles;this.model.beginUpdate();try{for(var d=0;d<c.length;d++)for(var b=this.getCurrentCellStyle(c[d]),e=0;e<f.length;e++){var g=b[f[e]],p=a[f[e]];g==p||null==g&&p==mxConstants.NONE||this.setCellStyles(f[e],p,[c[d]])}}finally{this.model.endUpdate()}};
Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,c,f,q,b,e){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,
-arguments)};Graph.prototype.getScaledCellAt=function(a,c,f,q,b,e){q=null!=q?q:!0;b=null!=b?b:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var d=this.model.getChildCount(f)-1;0<=d;d--){var p=this.model.getChildAt(f,d),m=this.getScaledCellAt(a,c,p,q,b,e);if(null!=m)return m;if(this.isCellVisible(p)&&(b&&this.model.isEdge(p)||q&&this.model.isVertex(p))&&(m=this.view.getState(p),null!=m&&(null==e||!e(m,a,c))&&this.intersects(m,a,c)))return p}return null};
+arguments)};Graph.prototype.getScaledCellAt=function(a,c,f,q,b,e){q=null!=q?q:!0;b=null!=b?b:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var d=this.model.getChildCount(f)-1;0<=d;d--){var p=this.model.getChildAt(f,d),n=this.getScaledCellAt(a,c,p,q,b,e);if(null!=n)return n;if(this.isCellVisible(p)&&(b&&this.model.isEdge(p)||q&&this.model.isVertex(p))&&(n=this.view.getState(p),null!=n&&(null==e||!e(n,a,c))&&this.intersects(n,a,c)))return p}return null};
Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")||this.isTableCell(a)||this.isTableRow(a)};Graph.prototype.getCompositeParent=function(a){for(;this.isPart(a);){var c=this.model.getParent(a);
if(!this.model.isVertex(c))break;a=c}return a};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,f=this.graph.currentScale,a=new mxRectangle((a.x+c.x)*f,(a.y+c.y)*f,a.width*f,a.height*f);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?
this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(c){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,
this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var c=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var f=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+f+","+f+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(c!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var q=
-a.style.display;a.style.display="none";a.getBBox();a.style.display=q}}catch(b){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var c=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,f=this.scale,n=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);c.apply(this,arguments);a&&(this.scale=f,this.translate=n)};var f=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(a,c,n){var d=this.useCssTransforms,b=this.view.scale,e=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);d&&(this.view.scale=b,this.view.translate=e,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+a.style.display;a.style.display="none";a.getBBox();a.style.display=q}}catch(b){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var c=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,f=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);c.apply(this,arguments);a&&(this.scale=f,this.translate=m)};var f=mxGraph.prototype.updatePageBreaks;
+mxGraph.prototype.updatePageBreaks=function(a,c,m){var d=this.useCssTransforms,b=this.view.scale,e=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);d&&(this.view.scale=b,this.view.translate=e,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,c,f){c=c.getAttribute("href");if(null!=c&&!this.isCustomLink(c)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(c)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(c),a);mxEvent.consume(f)}};
-Graph.prototype.openLink=function(a,c,f){var d=window;try{if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,null!=c?c:"_blank"),null==d||f||(d.opener=null)}catch(n){}return d};
+Graph.prototype.openLink=function(a,c,f){var d=window;try{if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,null!=c?c:"_blank"),null==d||f||(d.opener=null)}catch(m){}return d};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a,c){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,c){var f=this.graph.model.getParent(a);if(c!=mxEvent.BEGIN_UPDATE||this.hasLayout(f,c)){f=this.graph.getCellStyle(a);if("stackLayout"==f.childLayout){var d=new mxStackLayout(this.graph,!0);d.resizeParentMax="1"==mxUtils.getValue(f,"resizeParentMax","1");d.horizontal="1"==mxUtils.getValue(f,
@@ -2450,36 +2450,36 @@ Graph.prototype.isSplitTarget=function(a,c,f){return!this.model.isEdge(c[0])&&!m
Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(c,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getClickableLinkForCell=function(a){do{var c=this.getLinkForCell(a);if(null!=c)return c;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,q=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),f=!0);var b=f?"getUTC":"get",e=a[b+"Date"](),g=a[b+"Day"](),p=a[b+"Month"](),m=a[b+"FullYear"](),l=a[b+"Hours"](),v=a[b+"Minutes"](),t=a[b+"Seconds"](),b=a[b+"Milliseconds"](),y=f?0:a.getTimezoneOffset(),x={d:e,dd:q(e),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:p+1,mm:q(p+1),mmm:d.i18n.monthNames[p],mmmm:d.i18n.monthNames[p+
-12],yy:String(m).slice(2),yyyy:m,h:l%12||12,hh:q(l%12||12),H:l,HH:q(l),M:v,MM:q(v),s:t,ss:q(t),l:q(b,3),L:q(99<b?Math.round(b/10):b),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(n,""),o:(0<y?"-":"+")+q(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<e%10?0:(10!=e%100-e%10)*e%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,q=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),f=!0);var b=f?"getUTC":"get",e=a[b+"Date"](),g=a[b+"Day"](),p=a[b+"Month"](),n=a[b+"FullYear"](),l=a[b+"Hours"](),x=a[b+"Minutes"](),t=a[b+"Seconds"](),b=a[b+"Milliseconds"](),y=f?0:a.getTimezoneOffset(),v={d:e,dd:q(e),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:p+1,mm:q(p+1),mmm:d.i18n.monthNames[p],mmmm:d.i18n.monthNames[p+
+12],yy:String(n).slice(2),yyyy:n,h:l%12||12,hh:q(l%12||12),H:l,HH:q(l),M:x,MM:q(x),s:t,ss:q(t),l:q(b,3),L:q(99<b?Math.round(b/10):b),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<y?"-":"+")+q(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<e%10?0:(10!=e%100-e%10)*e%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in v?v[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),f=c.getChildCount(c.root),d=0;d<f;d++)mxUtils.bind(this,function(d){var f=document.createElement("div");f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.padding="2px";f.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");c.isVisible(d)&&(k.setAttribute("checked","checked"),
k.defaultChecked=!0);f.appendChild(k);var b=this.convertValueToString(d)||mxResources.get("background")||"Background";f.setAttribute("title",b);mxUtils.write(f,b);a.appendChild(f);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");c.setVisible(d,k.checked)})})(c.getChildAt(c.root,d));return a};
-Graph.prototype.replacePlaceholders=function(a,c){var f=[];if(null!=c){for(var d=0;match=this.placeholderPattern.exec(c);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var n=null;if(match.index>d&&"%"==c.charAt(match.index-1))n=k.substring(1);else{var q=k.substring(1,k.length-1);if("id"==q)n=a.id;else if(0>q.indexOf("{"))for(var b=a;null==n&&null!=b;)null!=b.value&&"object"==typeof b.value&&(n=b.hasAttribute(q)?null!=b.getAttribute(q)?b.getAttribute(q):"":null),b=this.model.getParent(b);
-null==n&&(n=this.getGlobalVariable(q))}f.push(c.substring(d,match.index)+(null!=n?n:k));d=match.index+k.length}}f.push(c.substring(d))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var c=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&c.push(d)}this.setSelectionCells(c)}else this.clearSelection()};
+Graph.prototype.replacePlaceholders=function(a,c){var f=[];if(null!=c){for(var d=0;match=this.placeholderPattern.exec(c);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var m=null;if(match.index>d&&"%"==c.charAt(match.index-1))m=k.substring(1);else{var q=k.substring(1,k.length-1);if("id"==q)m=a.id;else if(0>q.indexOf("{"))for(var b=a;null==m&&null!=b;)null!=b.value&&"object"==typeof b.value&&(m=b.hasAttribute(q)?null!=b.getAttribute(q)?b.getAttribute(q):"":null),b=this.model.getParent(b);
+null==m&&(m=this.getGlobalVariable(q))}f.push(c.substring(d,match.index)+(null!=m?m:k));d=match.index+k.length}}f.push(c.substring(d))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var c=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&c.push(d)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,c,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=f&&(mxEvent.isTouchEvent(c)?f.update(f.getState(this.view.getState(a[1]))):f.reset())):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,c,f,d,k,n,q,b){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];n=n?n:!1;var e=this.getCompositeParent(a),g=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(e.geometry.x,e.geometry.y);c==mxConstants.DIRECTION_NORTH?(g.x+=e.geometry.width/2,g.y-=f):c==mxConstants.DIRECTION_SOUTH?(g.x+=e.geometry.width/2,g.y+=e.geometry.height+f):(g.x=c==mxConstants.DIRECTION_WEST?
-g.x-f:g.x+(e.geometry.width+f),g.y+=e.geometry.height/2);var p=this.view.getState(this.model.getParent(a));f=this.view.scale;var m=this.view.translate,e=m.x*f,m=m.y*f;null!=p&&this.model.isVertex(p.cell)&&(e=p.x,m=p.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(g.x+=a.parent.geometry.x,g.y+=a.parent.geometry.y);var l=n?null:this.getCellAt(e+g.x*f,m+g.y*f),v=!1;null!=l&&this.model.isAncestor(l,a)&&(v=!0,l=null);for(n=l;null!=n;){if(this.isCellLocked(n)){l=null;break}n=this.model.getParent(n)}null!=
-l&&(n=this.view.getState(a),p=this.view.getState(l),null!=n&&null!=p&&mxUtils.intersects(n,p)&&(l=null));var t=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;t&&(c==mxConstants.DIRECTION_NORTH?g.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?g.y+=a.geometry.height/2:g.x=c==mxConstants.DIRECTION_WEST?g.x-a.geometry.width/2:g.x+a.geometry.width/2);null==l||this.isCellConnectable(l)||this.isSwimlane(l)||(k=this.getModel().getParent(l),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&
-(l=k));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l)&&!this.isSwimlane(l))l=null;var y=[],x=null!=l&&this.isSwimlane(l),D=x?null:l;k=mxUtils.bind(this,function(e){if(null==q||null!=e){this.model.beginUpdate();try{if(null==D&&t){for(var f=null!=e?e:a,m=this.getCellGeometry(f);null!=m&&m.relative;)f=this.getModel().getParent(f),m=this.getCellGeometry(f);f=this.getCompositeParent(f);D=null!=e?e:this.duplicateCells([f],!1)[0];null!=e&&this.addCells([D],this.model.getParent(a),null,null,null,
-!0);m=this.getCellGeometry(D);null!=m&&(m.x=g.x-m.width/2,m.y=g.y-m.height/2);x?(this.addCells([D],l,null,null,null,!0),l=null):t&&null==l&&!v&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&t||null==l&&null!=e&&e.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,D,this.createCurrentEdgeStyle());if(null!=p&&
+Graph.prototype.connectVertex=function(a,c,f,d,k,m,q,b){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var e=this.getCompositeParent(a),g=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(e.geometry.x,e.geometry.y);c==mxConstants.DIRECTION_NORTH?(g.x+=e.geometry.width/2,g.y-=f):c==mxConstants.DIRECTION_SOUTH?(g.x+=e.geometry.width/2,g.y+=e.geometry.height+f):(g.x=c==mxConstants.DIRECTION_WEST?
+g.x-f:g.x+(e.geometry.width+f),g.y+=e.geometry.height/2);var p=this.view.getState(this.model.getParent(a));f=this.view.scale;var n=this.view.translate,e=n.x*f,n=n.y*f;null!=p&&this.model.isVertex(p.cell)&&(e=p.x,n=p.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(g.x+=a.parent.geometry.x,g.y+=a.parent.geometry.y);var l=m?null:this.getCellAt(e+g.x*f,n+g.y*f),x=!1;null!=l&&this.model.isAncestor(l,a)&&(x=!0,l=null);for(m=l;null!=m;){if(this.isCellLocked(m)){l=null;break}m=this.model.getParent(m)}null!=
+l&&(m=this.view.getState(a),p=this.view.getState(l),null!=m&&null!=p&&mxUtils.intersects(m,p)&&(l=null));var t=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;t&&(c==mxConstants.DIRECTION_NORTH?g.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?g.y+=a.geometry.height/2:g.x=c==mxConstants.DIRECTION_WEST?g.x-a.geometry.width/2:g.x+a.geometry.width/2);null==l||this.isCellConnectable(l)||this.isSwimlane(l)||(k=this.getModel().getParent(l),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&
+(l=k));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l)&&!this.isSwimlane(l))l=null;var y=[],v=null!=l&&this.isSwimlane(l),D=v?null:l;k=mxUtils.bind(this,function(e){if(null==q||null!=e){this.model.beginUpdate();try{if(null==D&&t){for(var f=null!=e?e:a,n=this.getCellGeometry(f);null!=n&&n.relative;)f=this.getModel().getParent(f),n=this.getCellGeometry(f);f=this.getCompositeParent(f);D=null!=e?e:this.duplicateCells([f],!1)[0];null!=e&&this.addCells([D],this.model.getParent(a),null,null,null,
+!0);n=this.getCellGeometry(D);null!=n&&(n.x=g.x-n.width/2,n.y=g.y-n.height/2);v?(this.addCells([D],l,null,null,null,!0),l=null):t&&null==l&&!x&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&t||null==l&&null!=e&&e.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,D,this.createCurrentEdgeStyle());if(null!=p&&
this.connectionHandler.insertBeforeSource){for(var k=null,f=a;null!=f.parent&&null!=f.geometry&&f.geometry.relative&&f.parent!=p.parent;)f=this.model.getParent(f);null!=f&&null!=f.parent&&f.parent==p.parent&&(k=f.parent.getIndex(f),this.model.add(f.parent,p,k))}null==l&&null!=D&&null!=e&&null!=a.parent&&e.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),this.model.add(a.parent,D,k));null!=p&&y.push(p);null==l&&null!=D&&y.push(D);null==D&&null!=p&&p.geometry.setTerminalPoint(g,
-!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=b)b(y);else return y});if(null!=q&&null==D&&t)q(e+g.x*f,m+g.y*f,k);else return k()};
+!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=b)b(y);else return y});if(null!=q&&null==D&&t)q(e+g.x*f,n+g.y*f,k);else return k()};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],f,d;for(d in this.model.cells)if(f=this.model.cells[d],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(a.innerHTML=this.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([a])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&c.push(f);return c.join(" ")};
Graph.prototype.convertValueToString=function(a){var c=this.model.getValue(a);if(null!=c&&"object"==typeof c){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),f=a,d=null;null==d&&null!=f;)null!=f.value&&"object"==typeof f.value&&(d=f.hasAttribute(c)?null!=f.getAttribute(c)?f.getAttribute(c):"":null),f=this.model.getParent(f);return d||""}return c.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 c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!f.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(a,c,f){if(null!=a&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,c){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(c.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,c,f,d,k){c=null!=c?c:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<f.length;n++){var q=this.view.getState(f[n]),b=this.getCellGeometry(f[n]);if(null!=q&&null!=b){var e=Math.round(b.width-q.width/this.view.scale),g=Math.round(b.height-q.height/this.view.scale);if(0!=g||0!=e){var p=this.model.getParent(f[n]),m=this.layoutManager.getLayout(p);
-null==m?null!=k&&this.isMoveCellsEvent(k,q)&&this.moveSiblings(q,p,e,g):null!=k&&mxEvent.isAltDown(k)||m.constructor!=mxStackLayout||m.resizeLast||this.resizeParentStacks(p,m,e,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
-Graph.prototype.moveSiblings=function(a,c,f,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<k.length;c++)if(k[c]!=a.cell){var n=this.view.getState(k[c]),q=this.getCellGeometry(k[c]);null!=n&&null!=q&&(q=q.clone(),q.translate(Math.round(f*Math.max(0,Math.min(1,(n.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(n.y-a.y)/a.height)))),this.model.setGeometry(k[c],q))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,c,f,d){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var k=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==k&&!c.resizeLast;){var n=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=n&&(n=n.clone(),c.horizontal?n.width+=f+Math.min(0,q.width/this.view.scale-n.width):n.height+=d+Math.min(0,q.height/this.view.scale-n.height),this.model.setGeometry(a,
-n));a=this.model.getParent(a);c=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var c=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(a){var c=this.getCurrentCellStyle(a);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.foldCells=function(a,c,f,d,k){c=null!=c?c:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<f.length;m++){var q=this.view.getState(f[m]),b=this.getCellGeometry(f[m]);if(null!=q&&null!=b){var e=Math.round(b.width-q.width/this.view.scale),g=Math.round(b.height-q.height/this.view.scale);if(0!=g||0!=e){var p=this.model.getParent(f[m]),n=this.layoutManager.getLayout(p);
+null==n?null!=k&&this.isMoveCellsEvent(k,q)&&this.moveSiblings(q,p,e,g):null!=k&&mxEvent.isAltDown(k)||n.constructor!=mxStackLayout||n.resizeLast||this.resizeParentStacks(p,n,e,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
+Graph.prototype.moveSiblings=function(a,c,f,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<k.length;c++)if(k[c]!=a.cell){var m=this.view.getState(k[c]),q=this.getCellGeometry(k[c]);null!=m&&null!=q&&(q=q.clone(),q.translate(Math.round(f*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(k[c],q))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,c,f,d){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var k=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==k&&!c.resizeLast;){var m=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=m&&(m=m.clone(),c.horizontal?m.width+=f+Math.min(0,q.width/this.view.scale-m.width):m.height+=d+Math.min(0,q.height/this.view.scale-m.height),this.model.setGeometry(a,
+m));a=this.model.getParent(a);c=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var c=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(a){var c=this.getCurrentCellStyle(a);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);return null!=c.movableLabel?"0"!=c.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,c,f){f=f||this.getDefaultParent();this.isCellLocked(f)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(a,c,f){var d=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(d)&&(d=null);return d};Graph.prototype.isCellFoldable=function(a){var c=this.getCurrentCellStyle(a);return this.foldingEnabled&&("1"==c.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=c.collapsible||!this.isContainer(a)&&"1"==c.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
Graph.prototype.zoom=function(a,c){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(a,c){c=null!=c?c:10;var f=this.container.clientWidth-c,d=this.container.clientHeight-c,k=Math.floor(20*Math.min(f/a.width,d/a.height))/20;this.zoomTo(k);if(mxUtils.hasScrollbars(this.container)){var n=this.view.translate;this.container.scrollTop=(a.y+n.y)*k-Math.max((d-a.height*k)/2+c/2,0);this.container.scrollLeft=(a.x+n.x)*k-Math.max((f-a.width*k)/2+c/2,0)}};
+Graph.prototype.fitWindow=function(a,c){c=null!=c?c:10;var f=this.container.clientWidth-c,d=this.container.clientHeight-c,k=Math.floor(20*Math.min(f/a.width,d/a.height))/20;this.zoomTo(k);if(mxUtils.hasScrollbars(this.container)){var m=this.view.translate;this.container.scrollTop=(a.y+m.y)*k-Math.max((d-a.height*k)/2+c/2,0);this.container.scrollLeft=(a.x+m.x)*k-Math.max((f-a.width*k)/2+c/2,0)}};
Graph.prototype.getTooltipForCell=function(a){var c="";if(mxUtils.isNode(a.value)){var f=a.value.getAttribute("tooltip");if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),c=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&f.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(f,a[k].nodeName)&&0<a[k].nodeValue.length&&d.push({name:a[k].nodeName,value:a[k].nodeValue});d.sort(function(a,c){return a.name<c.name?
-1:a.name>c.name?1:0});for(k=0;k<d.length;k++)"link"==d[k].name&&this.isCustomLink(d[k].value)||(c+=("link"!=d[k].name?"<b>"+d[k].name+":</b> ":"")+mxUtils.htmlEntities(d[k].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;">'+c+"</div>"))}}return c};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};
Graph.prototype.compress=function(a,c){return Graph.compress(a,c)};Graph.prototype.decompress=function(a,c){return Graph.decompress(a,c)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
@@ -2491,8 +2491,8 @@ IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUC
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=
mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);
this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,
-mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(c.getEvent())||this.graph.model.isVertex(c.getCell())||this.reset()});var c=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){c=!1;var f=d.getEvent();if(this.isResetEvent(f))this.reset();else if(!this.isActive()){var n=this.getState(d.getState());
-null==n&&mxEvent.isTouchEvent(f)||this.update(n)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var f=d.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var f=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));
+mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(c.getEvent())||this.graph.model.isVertex(c.getCell())||this.reset()});var c=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){c=!1;var f=d.getEvent();if(this.isResetEvent(f))this.reset();else if(!this.isActive()){var m=this.getState(d.getState());
+null==m&&mxEvent.isTouchEvent(f)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var f=d.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var f=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));
this.isResetEvent(f)?this.reset():this.isActive()&&!c&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(f)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||
this.reset();c=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,c){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
HoverIcons.prototype.createArrow=function(a,c){var f=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(f=document.createElement(mxClient.VML_PREFIX+":image"),f.setAttribute("src",a.src),f.style.borderStyle="none"):(f=document.createElement("div"),f.style.backgroundImage="url("+a.src+")",f.style.backgroundPosition="center",f.style.backgroundRepeat="no-repeat"),f.style.width=a.width+4+"px",f.style.height=a.height+4+"px",f.style.display=mxClient.IS_QUIRKS?"inline":
@@ -2502,84 +2502,84 @@ this.resetActiveArrow()}));return f};HoverIcons.prototype.resetActiveArrow=funct
HoverIcons.prototype.visitNodes=function(a){for(var c=0;c<this.elts.length;c++)null!=this.elts[c]&&a(this.elts[c])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(c){c.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,c,f){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,c,f),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=c&&c.setHandlesVisible(!1),c=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=c&&"orthogonalEdgeStyle"===
mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),c.cell.style=mxUtils.setStyle(c.cell.style,"sourcePortConstraint",a),c.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,c,f){return this.graph.view.getState(this.graph.getCellAt(c,f))};
-HoverIcons.prototype.click=function(a,c,f){var d=f.getEvent(),k=f.getGraphX(),n=f.getGraphY(),k=this.getStateAt(a,k,n);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,c,f):(this.graph.setSelectionCell(k.cell),this.reset());f.consume()};
+HoverIcons.prototype.click=function(a,c,f){var d=f.getEvent(),k=f.getGraphX(),m=f.getGraphY(),k=this.getStateAt(a,k,m);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,c,f):(this.graph.setSelectionCell(k.cell),this.reset());f.consume()};
HoverIcons.prototype.execute=function(a,c,f){f=f.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,c,this.graph.defaultEdgeLength,f),f,this)};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
var c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(c=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var f=null;null!=c&&(a.x-=c.horizontalOffset/2,a.y-=c.verticalOffset/2,a.width+=c.horizontalOffset,a.height+=c.verticalOffset,null!=c.rotationShape&&null!=c.rotationShape.node&&"hidden"!=c.rotationShape.node.style.visibility&&"none"!=c.rotationShape.node.style.display&&null!=c.rotationShape.boundingBox&&
(f=c.rotationShape.boundingBox));c=mxUtils.bind(this,function(a,e,c){if(null!=f){var b=new mxRectangle(e,c,a.clientWidth,a.clientHeight);mxUtils.intersects(b,f)&&(a==this.arrowUp?c-=b.y+b.height-f.y:a==this.arrowRight?e+=f.x+f.width-b.x:a==this.arrowDown?c+=f.y+f.height-b.y:a==this.arrowLeft&&(e-=b.x+b.width-f.x))}a.style.left=e+"px";a.style.top=c+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});c(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
this.triangleUp.height-this.tolerance));c(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));c(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));c(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var c=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),
-d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),k=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=c&&c==d&&d==k&&k==a&&(a=k=d=c=null);var n=this.graph.getCellGeometry(this.currentState.cell),q=mxUtils.bind(this,function(a,e){var b=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
-this.currentState.cell)||this.graph.isSwimlane(a)||!(null==b||null==n||b.height<3*n.height&&b.width<3*n.width)?e.style.visibility="visible":e.style.visibility="hidden"});q(c,this.arrowRight);q(d,this.arrowLeft);q(k,this.arrowUp);q(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),k=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=c&&c==d&&d==k&&k==a&&(a=k=d=c=null);var m=this.graph.getCellGeometry(this.currentState.cell),q=mxUtils.bind(this,function(a,e){var b=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
+this.currentState.cell)||this.graph.isSwimlane(a)||!(null==b||null==m||b.height<3*m.height&&b.width<3*m.width)?e.style.visibility="visible":e.style.visibility="hidden"});q(c,this.arrowRight);q(d,this.arrowLeft);q(k,this.arrowUp);q(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(c){null!=c.parentNode&&(c=new mxRectangle(c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight),null==a?a=c:a.add(c))});return a};
HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var c=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(c)&&this.graph.isCellConnectable(c)&&(a=c)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
HoverIcons.prototype.update=function(a,c,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,c,f))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,f)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==c||null==f||!mxUtils.contains(this.bbox,
c,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,c,f,d,k){a=this.cloneCell(a);for(var n=0;n<f;n++){var q=this.cloneCell(c),b=this.getCellGeometry(q);null!=b&&(b.x+=n*d,b.y+=n*k);a.insert(q)}return a};
-Graph.prototype.createTable=function(a,c,f,d,k,n,q,b,e){f=null!=f?f:60;d=null!=d?d:40;n=null!=n?n:30;b=null!=b?b:"shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";e=null!=e?e:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;";return this.createParent(this.createVertex(null,null,null!=k?k:"",
-0,0,c*f,a*d+(null!=k?n:0),null!=q?q:"shape=table;html=1;whiteSpace=wrap;startSize="+(null!=k?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*f,d,b),this.createVertex(null,null,"",0,0,f,d,e),c,f,0),a,0,d)};
-Graph.prototype.setTableValues=function(a,c,f){for(var d=this.model.getChildCells(a,!0),k=0;k<d.length;k++)if(null!=f&&(d[k].value=f[k]),null!=c)for(var n=this.model.getChildCells(d[k],!0),q=0;q<n.length;q++)null!=c[k][q]&&(n[q].value=c[k][q]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,c,f,d,k,n,q,b,e){f=null!=f?f:120;d=null!=d?d:120;k=null!=k?k:40;q=null!=q?q:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";b=null!=b?b:"swimlane;connectable=0;startSize=40;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";e=null!=e?e:"swimlane;connectable=0;startSize=0;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-k=this.createVertex(null,null,"",0,0,c*f,a*d,null!=n?n:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");n=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=n;k.geometry.height+=n;q=this.createVertex(null,null,"",0,n,c*f+n,d,q);k.insert(this.createParent(q,this.createVertex(null,null,"",n,0,f,d,b),c,f,0));return 1<a?(q.geometry.y=
-d+n,this.createParent(k,this.createParent(q,this.createVertex(null,null,"",n,0,f,d,e),c,f,0),a-1,0,d)):k};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
-Graph.prototype.setTableRowHeight=function(a,c,f){f=null!=f?f:!0;var d=this.getModel();d.beginUpdate();try{var k=this.getCellGeometry(a);if(null!=k){k=k.clone();k.height+=c;d.setGeometry(a,k);var n=d.getParent(a),q=d.getChildCells(n,!0);if(!f){var b=mxUtils.indexOf(q,a);if(b<q.length-1){var e=q[b+1],g=this.getCellGeometry(e);null!=g&&(g=g.clone(),g.y+=c,g.height-=c,d.setGeometry(e,g))}}var p=this.getCellGeometry(n);null!=p&&(f||(f=a==q[q.length-1]),f&&(p=p.clone(),p.height+=c,d.setGeometry(n,p)));
-null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}}finally{d.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,c,f){f=null!=f?f:!1;var d=this.getModel(),k=d.getParent(a),n=d.getParent(k),q=d.getChildCells(k,!0);a=mxUtils.indexOf(q,a);var b=a==q.length-1;d.beginUpdate();try{for(var e=d.getChildCells(n,!0),g=0;g<e.length;g++){var k=e[g],q=d.getChildCells(k,!0),p=q[a],m=this.getCellGeometry(p);null!=m&&(m=m.clone(),m.width+=c,d.setGeometry(p,m));a<q.length-1&&(p=q[a+1],m=this.getCellGeometry(p),null!=m&&(m=m.clone(),m.x+=c,f||(m.width-=c),d.setGeometry(p,m)))}if(b||
-f){var l=this.getCellGeometry(n);null!=l&&(l=l.clone(),l.width+=c,d.setGeometry(n,l))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
-TableLayout.prototype.getSize=function(a,c){for(var f=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var k=this.graph.getCellGeometry(a[d]);null!=k&&(f+=c?k.width:k.height)}return f};TableLayout.prototype.getRowLayout=function(a,c){for(var f=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0),k=this.getSize(f,!0),n=c-d.x-d.width,q=[],d=d.x,b=0;b<f.length;b++){var e=this.graph.getCellGeometry(f[b]);null!=e&&(d+=e.width*n/k,q.push(Math.round(d)))}return q};
-TableLayout.prototype.layoutRow=function(a,c,f,d){var k=this.graph.getModel(),n=k.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var q=a.x,b=0;null!=c&&(c=c.slice(),c.splice(0,0,a.x));for(var e=0;e<n.length;e++){var g=this.graph.getCellGeometry(n[e]);null!=g&&(g=g.clone(),g.y=a.y,g.height=f-a.y-a.height,null!=c?(g.x=c[e],g.width=c[e+1]-g.x,e==n.length-1&&e<c.length-2&&(g.width=d-g.x-a.x-a.width)):(g.x=q,q+=g.width,e==n.length-1?g.width=d-a.x-a.width-b:b+=g.width),k.setGeometry(n[e],g))}return b};
-TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),k="1"==mxUtils.getValue(d,"resizeLastRow","0"),n="1"==mxUtils.getValue(d,"resizeLast","0"),d="1"==mxUtils.getValue(d,"fixedRows","0"),q=this.graph.getModel(),b=0;q.beginUpdate();try{var e=f.height-c.y-c.height,g=f.width-c.x-c.width,p=q.getChildCells(a,!0),m=this.getSize(p,!1);if(0<e&&0<g&&0<p.length&&0<m){if(k){var l=this.graph.getCellGeometry(p[p.length-
-1]);null!=l&&(l=l.clone(),l.height=e-m+l.height,q.setGeometry(p[p.length-1],l))}for(var v=n?null:this.getRowLayout(p[0],g),t=c.y,y=0;y<p.length;y++)l=this.graph.getCellGeometry(p[y]),null!=l&&(l=l.clone(),l.x=c.x,l.width=g,l.y=Math.round(t),t=k||d?t+l.height:t+l.height/m*e,l.height=Math.round(t)-l.y,q.setGeometry(p[y],l)),b=Math.max(b,this.layoutRow(p[y],v,l.height,g));d&&e<m&&(f=f.clone(),f.height=t+c.height,q.setGeometry(a,f));n&&g<b+Graph.minTableColumnWidth&&(f=f.clone(),f.width=b+c.width+c.x+
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,c,f,d,k){a=this.cloneCell(a);for(var m=0;m<f;m++){var q=this.cloneCell(c),b=this.getCellGeometry(q);null!=b&&(b.x+=m*d,b.y+=m*k);a.insert(q)}return a};
+Graph.prototype.createTable=function(a,c,f,d,k,m,q,b,e){f=null!=f?f:60;d=null!=d?d:40;m=null!=m?m:30;b=null!=b?b:"shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";e=null!=e?e:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;";return this.createParent(this.createVertex(null,null,null!=k?k:"",
+0,0,c*f,a*d+(null!=k?m:0),null!=q?q:"shape=table;html=1;whiteSpace=wrap;startSize="+(null!=k?m:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*f,d,b),this.createVertex(null,null,"",0,0,f,d,e),c,f,0),a,0,d)};
+Graph.prototype.setTableValues=function(a,c,f){for(var d=this.model.getChildCells(a,!0),k=0;k<d.length;k++)if(null!=f&&(d[k].value=f[k]),null!=c)for(var m=this.model.getChildCells(d[k],!0),q=0;q<m.length;q++)null!=c[k][q]&&(m[q].value=c[k][q]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,c,f,d,k,m,q,b,e){f=null!=f?f:120;d=null!=d?d:120;k=null!=k?k:40;q=null!=q?q:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";b=null!=b?b:"swimlane;connectable=0;startSize=40;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";e=null!=e?e:"swimlane;connectable=0;startSize=0;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+k=this.createVertex(null,null,"",0,0,c*f,a*d,null!=m?m:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");m=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=m;k.geometry.height+=m;q=this.createVertex(null,null,"",0,m,c*f+m,d,q);k.insert(this.createParent(q,this.createVertex(null,null,"",m,0,f,d,b),c,f,0));return 1<a?(q.geometry.y=
+d+m,this.createParent(k,this.createParent(q,this.createVertex(null,null,"",m,0,f,d,e),c,f,0),a-1,0,d)):k};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
+Graph.prototype.setTableRowHeight=function(a,c,f){f=null!=f?f:!0;var d=this.getModel();d.beginUpdate();try{var k=this.getCellGeometry(a);if(null!=k){k=k.clone();k.height+=c;d.setGeometry(a,k);var m=d.getParent(a),q=d.getChildCells(m,!0);if(!f){var b=mxUtils.indexOf(q,a);if(b<q.length-1){var e=q[b+1],g=this.getCellGeometry(e);null!=g&&(g=g.clone(),g.y+=c,g.height-=c,d.setGeometry(e,g))}}var p=this.getCellGeometry(m);null!=p&&(f||(f=a==q[q.length-1]),f&&(p=p.clone(),p.height+=c,d.setGeometry(m,p)));
+null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}}finally{d.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,c,f){f=null!=f?f:!1;var d=this.getModel(),k=d.getParent(a),m=d.getParent(k),q=d.getChildCells(k,!0);a=mxUtils.indexOf(q,a);var b=a==q.length-1;d.beginUpdate();try{for(var e=d.getChildCells(m,!0),g=0;g<e.length;g++){var k=e[g],q=d.getChildCells(k,!0),p=q[a],n=this.getCellGeometry(p);null!=n&&(n=n.clone(),n.width+=c,d.setGeometry(p,n));a<q.length-1&&(p=q[a+1],n=this.getCellGeometry(p),null!=n&&(n=n.clone(),n.x+=c,f||(n.width-=c),d.setGeometry(p,n)))}if(b||
+f){var l=this.getCellGeometry(m);null!=l&&(l=l.clone(),l.width+=c,d.setGeometry(m,l))}null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+TableLayout.prototype.getSize=function(a,c){for(var f=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var k=this.graph.getCellGeometry(a[d]);null!=k&&(f+=c?k.width:k.height)}return f};TableLayout.prototype.getRowLayout=function(a,c){for(var f=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0),k=this.getSize(f,!0),m=c-d.x-d.width,q=[],d=d.x,b=0;b<f.length;b++){var e=this.graph.getCellGeometry(f[b]);null!=e&&(d+=e.width*m/k,q.push(Math.round(d)))}return q};
+TableLayout.prototype.layoutRow=function(a,c,f,d){var k=this.graph.getModel(),m=k.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var q=a.x,b=0;null!=c&&(c=c.slice(),c.splice(0,0,a.x));for(var e=0;e<m.length;e++){var g=this.graph.getCellGeometry(m[e]);null!=g&&(g=g.clone(),g.y=a.y,g.height=f-a.y-a.height,null!=c?(g.x=c[e],g.width=c[e+1]-g.x,e==m.length-1&&e<c.length-2&&(g.width=d-g.x-a.x-a.width)):(g.x=q,q+=g.width,e==m.length-1?g.width=d-a.x-a.width-b:b+=g.width),k.setGeometry(m[e],g))}return b};
+TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),k="1"==mxUtils.getValue(d,"resizeLastRow","0"),m="1"==mxUtils.getValue(d,"resizeLast","0"),d="1"==mxUtils.getValue(d,"fixedRows","0"),q=this.graph.getModel(),b=0;q.beginUpdate();try{var e=f.height-c.y-c.height,g=f.width-c.x-c.width,p=q.getChildCells(a,!0),n=this.getSize(p,!1);if(0<e&&0<g&&0<p.length&&0<n){if(k){var l=this.graph.getCellGeometry(p[p.length-
+1]);null!=l&&(l=l.clone(),l.height=e-n+l.height,q.setGeometry(p[p.length-1],l))}for(var x=m?null:this.getRowLayout(p[0],g),t=c.y,y=0;y<p.length;y++)l=this.graph.getCellGeometry(p[y]),null!=l&&(l=l.clone(),l.x=c.x,l.width=g,l.y=Math.round(t),t=k||d?t+l.height:t+l.height/n*e,l.height=Math.round(t)-l.y,q.setGeometry(p[y],l)),b=Math.max(b,this.layoutRow(p[y],x,l.height,g));d&&e<n&&(f=f.clone(),f.height=t+c.height,q.setGeometry(a,f));m&&g<b+Graph.minTableColumnWidth&&(f=f.clone(),f.width=b+c.width+c.x+
Graph.minTableColumnWidth,q.setGeometry(a,f))}}finally{q.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var e=this.getState(a);null!=e&&b&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&!e.invalid&&this.updateLineJumps(e)&&this.graph.cellRenderer.redraw(e,!1,this.isRendering());e=c.apply(this,
arguments);null!=e&&b&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var f=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return f.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=a.routedPoints,c=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(b,e,d){var f=new mxPoint(e,d);f.type=b;c.push(f);f=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==f||f.type!=b||f.x!=e||f.y!=d},f=.5*this.scale,e=!1,c=[],t=0;t<b.length-1;t++){for(var k=
-b[t+1],n=b[t],q=[],A=b[t+2];t<b.length-2&&mxUtils.ptSegDistSq(n.x,n.y,A.x,A.y,k.x,k.y)<1*this.scale*this.scale;)k=A,t++,A=b[t+2];for(var e=d(0,n.x,n.y)||e,C=0;C<this.validEdges.length;C++){var z=this.validEdges[C],E=z.absolutePoints;if(null!=E&&mxUtils.intersects(a,z)&&"1"!=z.style.noJump)for(z=0;z<E.length-1;z++){for(var G=E[z+1],F=E[z],A=E[z+2];z<E.length-2&&mxUtils.ptSegDistSq(F.x,F.y,A.x,A.y,G.x,G.y)<1*this.scale*this.scale;)G=A,z++,A=E[z+2];A=mxUtils.intersection(n.x,n.y,k.x,k.y,F.x,F.y,G.x,
-G.y);if(null!=A&&(Math.abs(A.x-n.x)>f||Math.abs(A.y-n.y)>f)&&(Math.abs(A.x-k.x)>f||Math.abs(A.y-k.y)>f)&&(Math.abs(A.x-F.x)>f||Math.abs(A.y-F.y)>f)&&(Math.abs(A.x-G.x)>f||Math.abs(A.y-G.y)>f)){G=A.x-n.x;F=A.y-n.y;A={distSq:G*G+F*F,x:A.x,y:A.y};for(G=0;G<q.length;G++)if(q[G].distSq>A.distSq){q.splice(G,0,A);A=null;break}null==A||0!=q.length&&q[q.length-1].x===A.x&&q[q.length-1].y===A.y||q.push(A)}}}for(z=0;z<q.length;z++)e=d(1,q[z].x,q[z].y)||e}A=b[b.length-1];e=d(0,A.x,A.y)||e}a.routedPoints=c;return e}return!1};
+b[t+1],m=b[t],q=[],z=b[t+2];t<b.length-2&&mxUtils.ptSegDistSq(m.x,m.y,z.x,z.y,k.x,k.y)<1*this.scale*this.scale;)k=z,t++,z=b[t+2];for(var e=d(0,m.x,m.y)||e,C=0;C<this.validEdges.length;C++){var A=this.validEdges[C],E=A.absolutePoints;if(null!=E&&mxUtils.intersects(a,A)&&"1"!=A.style.noJump)for(A=0;A<E.length-1;A++){for(var G=E[A+1],F=E[A],z=E[A+2];A<E.length-2&&mxUtils.ptSegDistSq(F.x,F.y,z.x,z.y,G.x,G.y)<1*this.scale*this.scale;)G=z,A++,z=E[A+2];z=mxUtils.intersection(m.x,m.y,k.x,k.y,F.x,F.y,G.x,
+G.y);if(null!=z&&(Math.abs(z.x-m.x)>f||Math.abs(z.y-m.y)>f)&&(Math.abs(z.x-k.x)>f||Math.abs(z.y-k.y)>f)&&(Math.abs(z.x-F.x)>f||Math.abs(z.y-F.y)>f)&&(Math.abs(z.x-G.x)>f||Math.abs(z.y-G.y)>f)){G=z.x-m.x;F=z.y-m.y;z={distSq:G*G+F*F,x:z.x,y:z.y};for(G=0;G<q.length;G++)if(q[G].distSq>z.distSq){q.splice(G,0,z);z=null;break}null==z||0!=q.length&&q[q.length-1].x===z.x&&q[q.length-1].y===z.y||q.push(z)}}}for(A=0;A<q.length;A++)e=d(1,q[A].x,q[A].y)||e}z=b[b.length-1];e=d(0,z.x,z.y)||e}a.routedPoints=c;return e}return!1};
var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,
-"jumpStyle","none"),g=!0,p=null,n=null,q=[],A=null;a.begin();for(var C=0;C<this.state.routedPoints.length;C++){var z=this.state.routedPoints[C],E=new mxPoint(z.x/this.scale,z.y/this.scale);0==C?E=b[0]:C==this.state.routedPoints.length-1&&(E=b[b.length-1]);var G=!1;if(null!=p&&1==z.type){var F=this.state.routedPoints[C+1],z=F.x/this.scale-E.x,F=F.y/this.scale-E.y,z=z*z+F*F;null==A&&(A=new mxPoint(E.x-p.x,E.y-p.y),n=Math.sqrt(A.x*A.x+A.y*A.y),0<n?(A.x=A.x*d/n,A.y=A.y*d/n):A=null);z>d*d&&0<n&&(z=p.x-
-E.x,F=p.y-E.y,z=z*z+F*F,z>d*d&&(G=new mxPoint(E.x-A.x,E.y-A.y),z=new mxPoint(E.x+A.x,E.y+A.y),q.push(G),this.addPoints(a,q,c,e,!1,null,g),q=0>Math.round(A.x)||0==Math.round(A.x)&&0>=Math.round(A.y)?1:-1,g=!1,"sharp"==f?(a.lineTo(G.x-A.y*q,G.y+A.x*q),a.lineTo(z.x-A.y*q,z.y+A.x*q),a.lineTo(z.x,z.y)):"arc"==f?(q*=1.3,a.curveTo(G.x-A.y*q,G.y+A.x*q,z.x-A.y*q,z.y+A.x*q,z.x,z.y)):(a.moveTo(z.x,z.y),g=!0),q=[z],G=!0))}else A=null;G||(q.push(E),p=E)}this.addPoints(a,q,c,e,!1,null,g);a.stroke()}};var n=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)n.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var p=Math.cos(-g),k=Math.sin(-g),e=mxUtils.getRotatedPoint(e,p,k,m);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);p+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);e=this.getPerimeterPoint(b,e,0==g&&f,p);0!=g&&(p=Math.cos(g),k=Math.sin(g),e=mxUtils.getRotatedPoint(e,p,k,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,f){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var e=0;e<a.length;e++){var g=this.graph.getConnectionPoint(b,
-a[e]);if(null!=g){var m=(g.x-f.x)*(g.x-f.x)+(g.y-f.y)*(g.y-f.y);if(null==d||m<d)c=g,d=m}}null!=c&&(f=c)}return f};var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var e=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var b=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var e=
+"jumpStyle","none"),g=!0,p=null,m=null,q=[],z=null;a.begin();for(var C=0;C<this.state.routedPoints.length;C++){var A=this.state.routedPoints[C],E=new mxPoint(A.x/this.scale,A.y/this.scale);0==C?E=b[0]:C==this.state.routedPoints.length-1&&(E=b[b.length-1]);var G=!1;if(null!=p&&1==A.type){var F=this.state.routedPoints[C+1],A=F.x/this.scale-E.x,F=F.y/this.scale-E.y,A=A*A+F*F;null==z&&(z=new mxPoint(E.x-p.x,E.y-p.y),m=Math.sqrt(z.x*z.x+z.y*z.y),0<m?(z.x=z.x*d/m,z.y=z.y*d/m):z=null);A>d*d&&0<m&&(A=p.x-
+E.x,F=p.y-E.y,A=A*A+F*F,A>d*d&&(G=new mxPoint(E.x-z.x,E.y-z.y),A=new mxPoint(E.x+z.x,E.y+z.y),q.push(G),this.addPoints(a,q,c,e,!1,null,g),q=0>Math.round(z.x)||0==Math.round(z.x)&&0>=Math.round(z.y)?1:-1,g=!1,"sharp"==f?(a.lineTo(G.x-z.y*q,G.y+z.x*q),a.lineTo(A.x-z.y*q,A.y+z.x*q),a.lineTo(A.x,A.y)):"arc"==f?(q*=1.3,a.curveTo(G.x-z.y*q,G.y+z.x*q,A.x-z.y*q,A.y+z.x*q,A.x,A.y)):(a.moveTo(A.x,A.y),g=!0),q=[A],G=!0))}else z=null;G||(q.push(E),p=E)}this.addPoints(a,q,c,e,!1,null,g);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var p=Math.cos(-g),k=Math.sin(-g),e=mxUtils.getRotatedPoint(e,p,k,n);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);p+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);e=this.getPerimeterPoint(b,e,0==g&&f,p);0!=g&&(p=Math.cos(g),k=Math.sin(g),e=mxUtils.getRotatedPoint(e,p,k,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,f){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var e=0;e<a.length;e++){var g=this.graph.getConnectionPoint(b,
+a[e]);if(null!=g){var n=(g.x-f.x)*(g.x-f.x)+(g.y-f.y)*(g.y-f.y);if(null==d||n<d)c=g,d=n}}null!=c&&(f=c)}return f};var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var e=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var b=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var e=
mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=e&&"string"===typeof e&&"stencil("==e.substring(0,8))try{var c=e.substring(8,e.length-1),d=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(d.documentElement))}catch(l){null!=window.console&&console.log("Error in shape: "+l)}}return b.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){c=mxStencilRegistry.libraries[f];if(null!=c){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<c.length;d++){var k=c[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var n=
-mxUtils.load(k);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",k,q)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
+mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){c=mxStencilRegistry.libraries[f];if(null!=c){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<c.length;d++){var k=c[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var m=
+mxUtils.load(k);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",k,q)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);c=mxStencilRegistry.stencils[a]}}return c};
mxStencilRegistry.getBasenameForStencil=function(a){var c=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var c=a[1],f=2;f<a.length-1;f++)c+="/"+a[f];return c};
-mxStencilRegistry.loadStencilSet=function(a,c,f,d){var k=mxStencilRegistry.packages[a];if(null!=f&&f||null==k){var n=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,n=!0,mxStencilRegistry.parseStencilSet(d.documentElement,c,n))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;n=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!=
-k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,c,n)}};mxStencilRegistry.loadStencil=function(a,c){if(null!=c)mxUtils.get(a,mxUtils.bind(this,function(a){c(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var c=0;c<a.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[c]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,c,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,c,f),d=d.nextSibling;else{f=null!=f?f:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),n=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(k+n.toLowerCase(),new mxStencil(d));if(null!=c){var q=d.getAttribute("w"),
-b=d.getAttribute("h"),q=null==q?80:parseInt(q,10),b=null==b?80:parseInt(b,10);c(k,n,a,q,b)}}d=d.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,c,f,d){var k=mxStencilRegistry.packages[a];if(null!=f&&f||null==k){var m=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,c,m))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;m=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!=
+k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,c,m)}};mxStencilRegistry.loadStencil=function(a,c){if(null!=c)mxUtils.get(a,mxUtils.bind(this,function(a){c(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var c=0;c<a.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[c]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,c,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,c,f),d=d.nextSibling;else{f=null!=f?f:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),m=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(k+m.toLowerCase(),new mxStencil(d));if(null!=c){var q=d.getAttribute("w"),
+b=d.getAttribute("h"),q=null==q?80:parseInt(q,10),b=null==b?80:parseInt(b,10);c(k,m,a,q,b)}}d=d.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function c(a,b){switch(b){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
"#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=
!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var f=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(a){return f.apply(this,arguments)||this.graph.isTableRow(a)||this.graph.isTableCell(a)};var d=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||d.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=
function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var b in this.graph.currentEdgeStyle)a.style[b]=this.graph.currentEdgeStyle[b];
-return a};var k=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=k.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var n=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=n.apply(this,arguments),b=a.getCell;a.getCell=mxUtils.bind(this,function(a){var e=b.apply(this,arguments);this.error=
+return a};var k=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=k.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var m=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=m.apply(this,arguments),b=a.getCell;a.getCell=mxUtils.bind(this,function(a){var e=b.apply(this,arguments);this.error=
null;return e});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.sketch&&(a+="sketch="+this.currentEdgeStyle.sketch+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};
Graph.prototype.updateCellStyles=function(a,b,e){this.model.beginUpdate();try{for(var c=0;c<e.length;c++)if(this.model.isVertex(e[c])||this.model.isEdge(e[c])){this.setCellStyles(a,null,[e[c]]);var d=this.getCellStyle(e[c])[a];b!=(null==d?mxConstants.NONE:d)&&this.setCellStyles(a,b,[e[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?
mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,b){b=null!=b?b:{};for(var e=0;e<a.length;e++){var c=a[e];b[mxObjectIdentity.get(c)]=c.getId();for(var d=this.model.getChildCount(c),f=0;f<d;f++)this.createCellLookup([this.model.getChildAt(c,f)],b)}return b};Graph.prototype.createCellMapping=function(a,b,e){e=null!=e?e:{};for(var c in a){var d=b[c];null==e[d]&&(e[d]=a[c].getId()||
-"")}return e};Graph.prototype.importGraphModel=function(a,b,e,c){b=null!=b?b:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),f=new mxGraphModel;d.decode(a,f);a=[];var d={},g={},m=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),d));if(null!=m){var p=this.createCellLookup([f.root]),m=m.slice();this.model.beginUpdate();try{if(1!=m.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<m.length;f++){var l=this.model.getChildren(this.moveCells([m[f]],b,e,!1,this.model.getRoot())[0]);
-null!=l&&(a=a.concat(l))}else a=this.moveCells(f.getChildren(m[0]),b,e,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,p,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(b=this.snap(b),e=this.snap(e));var u=this.getBoundingBoxFromGeometry(a,!0);null!=u&&this.moveCells(a,b-u.x,e-u.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},e=this.cloneCells(a,null,b),
-c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(var f=new mxCodec,g=new mxGraphModel,m=g.getChildAt(g.getRoot(),0),d=0;d<e.length;d++){g.add(m,e[d]);var p=this.view.getState(a[d]);if(null!=p){var l=this.getCellGeometry(e[d]);null!=l&&l.relative&&!this.model.isEdge(a[d])&&null==c.get(this.model.getParent(a[d]))&&(l.offset=null,l.relative=!1,l.x=p.x/p.view.scale-p.view.translate.x,l.y=p.y/p.view.scale-p.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(b,this.createCellLookup(a)),
+"")}return e};Graph.prototype.importGraphModel=function(a,b,e,c){b=null!=b?b:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),f=new mxGraphModel;d.decode(a,f);a=[];var d={},g={},n=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),d));if(null!=n){var l=this.createCellLookup([f.root]),n=n.slice();this.model.beginUpdate();try{if(1!=n.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<n.length;f++){var u=this.model.getChildren(this.moveCells([n[f]],b,e,!1,this.model.getRoot())[0]);
+null!=u&&(a=a.concat(u))}else a=this.moveCells(f.getChildren(n[0]),b,e,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,l,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(b=this.snap(b),e=this.snap(e));var p=this.getBoundingBoxFromGeometry(a,!0);null!=p&&this.moveCells(a,b-p.x,e-p.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},e=this.cloneCells(a,null,b),
+c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(var f=new mxCodec,g=new mxGraphModel,n=g.getChildAt(g.getRoot(),0),d=0;d<e.length;d++){g.add(n,e[d]);var l=this.view.getState(a[d]);if(null!=l){var u=this.getCellGeometry(e[d]);null!=u&&u.relative&&!this.model.isEdge(a[d])&&null==c.get(this.model.getParent(a[d]))&&(u.offset=null,u.relative=!1,u.x=l.x/l.view.scale-l.view.translate.x,u.y=l.y/l.view.scale-l.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(b,this.createCellLookup(a)),
e);return f.encode(g)};Graph.prototype.isSwimlane=function(a,b){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var e=this.getCurrentCellStyle(a,b)[mxConstants.STYLE_SHAPE];return e==mxConstants.SHAPE_SWIMLANE||"table"==e}return!1};var q=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);if(null!=b){var e=this.getCurrentCellStyle(b);if(null!=e.expand)return"0"!=e.expand}return q.apply(this,arguments)&&(null==b||
-!this.isTable(b))};var b=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,e,c,d,f,g,m,p){null==p&&(p=this.model.getParent(a),this.isTable(p)||this.isTableRow(p))&&(p=this.getCellAt(g,m,null,!0,!1));b.apply(this,[a,e,c,d,f,g,m,p])};var e=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)e.apply(this,arguments);else{var d=this.getSelectionCell(),f=null,g=[],m=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(g.push(b),
-b==d)f=g.length-1;else if(a&&null==d&&0<g.length||null!=f&&a&&g.length>f||!a&&0<f)return;for(var e=0;e<this.model.getChildCount(b);e++)m(this.model.getChildAt(b,e))});m(this.model.root);0<g.length&&(f=null!=f?mxUtils.mod(f+(a?1:-1),g.length):0,this.setSelectionCell(g[f]))}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,e,c,d,f,m){m=null!=m?m:{};if(this.isTable(d)){for(var p=[],l=0;l<a.length;l++)this.isTable(a[l])?p=p.concat(this.model.getChildCells(a[l],!0).reverse()):p.push(a[l]);
-a=p}this.model.beginUpdate();try{p=[];for(l=0;l<a.length;l++)if(null!=d&&this.isTableRow(a[l])){var u=this.model.getParent(a[l]),t=this.getCellGeometry(a[l]);this.isTable(u)&&p.push(u);if(null!=u&&null!=t&&this.isTable(u)&&this.isTable(d)&&(c||u!=d)){if(!c){var R=this.getCellGeometry(u);null!=R&&(R=R.clone(),R.height-=t.height,this.model.setGeometry(u,R))}R=this.getCellGeometry(d);null!=R&&(R=R.clone(),R.height+=t.height,this.model.setGeometry(d,R));var B=this.model.getChildCells(d,!0);if(0<B.length){var k=
-c?this.cloneCell(a[l]):a[l],n=this.model.getChildCells(k,!0),v=this.model.getChildCells(B[0],!0),y=v.length-n.length;if(0<y)for(var K=0;K<y;K++){var x=this.cloneCell(n[n.length-1]);null!=x&&(x.value="",this.model.add(k,x))}else if(0>y)for(K=0;K>y;K--)this.model.remove(n[n.length+K-1]);n=this.model.getChildCells(k,!0);for(K=0;K<v.length;K++){var L=this.getCellGeometry(v[K]),ia=this.getCellGeometry(n[K]);null!=L&&null!=ia&&(ia=ia.clone(),ia.width=L.width,this.model.setGeometry(n[K],ia))}}}}for(var H=
-g.apply(this,arguments),l=0;l<p.length;l++)!c&&this.model.contains(p[l])&&0==this.model.getChildCount(p[l])&&this.model.remove(p[l]);c&&this.updateCustomLinks(this.createCellMapping(m,this.createCellLookup(a)),H)}finally{this.model.endUpdate()}return H};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,b){var e=[];this.model.beginUpdate();try{for(var c=0;c<a.length;c++)if(this.isTableCell(a[c])){var d=this.model.getParent(a[c]),f=this.model.getParent(d);1==this.model.getChildCount(d)&&
-1==this.model.getChildCount(f)?0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f)&&e.push(f):this.labelChanged(a[c],"")}else{if(this.isTableRow(a[c])&&(f=this.model.getParent(a[c]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f))){for(var g=this.model.getChildCells(f,!0),m=0,l=0;l<g.length;l++)0<=mxUtils.indexOf(a,g[l])&&m++;m==g.length&&e.push(f)}e.push(a[c])}e=p.apply(this,[e,b])}finally{this.model.endUpdate()}return e};Graph.prototype.updateCustomLinks=function(a,b){for(var e=0;e<b.length;e++)null!=
+!this.isTable(b))};var b=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,e,c,d,f,g,n,l){null==l&&(l=this.model.getParent(a),this.isTable(l)||this.isTableRow(l))&&(l=this.getCellAt(g,n,null,!0,!1));b.apply(this,[a,e,c,d,f,g,n,l])};var e=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)e.apply(this,arguments);else{var d=this.getSelectionCell(),f=null,g=[],n=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(g.push(b),
+b==d)f=g.length-1;else if(a&&null==d&&0<g.length||null!=f&&a&&g.length>f||!a&&0<f)return;for(var e=0;e<this.model.getChildCount(b);e++)n(this.model.getChildAt(b,e))});n(this.model.root);0<g.length&&(f=null!=f?mxUtils.mod(f+(a?1:-1),g.length):0,this.setSelectionCell(g[f]))}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,e,c,d,f,n){n=null!=n?n:{};if(this.isTable(d)){for(var l=[],u=0;u<a.length;u++)this.isTable(a[u])?l=l.concat(this.model.getChildCells(a[u],!0).reverse()):l.push(a[u]);
+a=l}this.model.beginUpdate();try{l=[];for(u=0;u<a.length;u++)if(null!=d&&this.isTableRow(a[u])){var p=this.model.getParent(a[u]),t=this.getCellGeometry(a[u]);this.isTable(p)&&l.push(p);if(null!=p&&null!=t&&this.isTable(p)&&this.isTable(d)&&(c||p!=d)){if(!c){var R=this.getCellGeometry(p);null!=R&&(R=R.clone(),R.height-=t.height,this.model.setGeometry(p,R))}R=this.getCellGeometry(d);null!=R&&(R=R.clone(),R.height+=t.height,this.model.setGeometry(d,R));var B=this.model.getChildCells(d,!0);if(0<B.length){var k=
+c?this.cloneCell(a[u]):a[u],m=this.model.getChildCells(k,!0),x=this.model.getChildCells(B[0],!0),y=x.length-m.length;if(0<y)for(var K=0;K<y;K++){var v=this.cloneCell(m[m.length-1]);null!=v&&(v.value="",this.model.add(k,v))}else if(0>y)for(K=0;K>y;K--)this.model.remove(m[m.length+K-1]);m=this.model.getChildCells(k,!0);for(K=0;K<x.length;K++){var L=this.getCellGeometry(x[K]),ia=this.getCellGeometry(m[K]);null!=L&&null!=ia&&(ia=ia.clone(),ia.width=L.width,this.model.setGeometry(m[K],ia))}}}}for(var H=
+g.apply(this,arguments),u=0;u<l.length;u++)!c&&this.model.contains(l[u])&&0==this.model.getChildCount(l[u])&&this.model.remove(l[u]);c&&this.updateCustomLinks(this.createCellMapping(n,this.createCellLookup(a)),H)}finally{this.model.endUpdate()}return H};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,b){var e=[];this.model.beginUpdate();try{for(var c=0;c<a.length;c++)if(this.isTableCell(a[c])){var d=this.model.getParent(a[c]),f=this.model.getParent(d);1==this.model.getChildCount(d)&&
+1==this.model.getChildCount(f)?0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f)&&e.push(f):this.labelChanged(a[c],"")}else{if(this.isTableRow(a[c])&&(f=this.model.getParent(a[c]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f))){for(var g=this.model.getChildCells(f,!0),n=0,l=0;l<g.length;l++)0<=mxUtils.indexOf(a,g[l])&&n++;n==g.length&&e.push(f)}e.push(a[c])}e=p.apply(this,[e,b])}finally{this.model.endUpdate()}return e};Graph.prototype.updateCustomLinks=function(a,b){for(var e=0;e<b.length;e++)null!=
b[e]&&this.updateCustomLinksForCell(a,b[e])};Graph.prototype.updateCustomLinksForCell=function(a,b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var e=mxUtils.getValue(a.style,"points",null);if(null!=e){var c=[];try{for(var d=JSON.parse(e),e=0;e<d.length;e++){var f=d[e];c.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(wa){}return c}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;
d=a.shape.bounds;e=a.shape.scale;c=d.width/e;d=d.height/e;if(f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)f=c,c=d,d=f;e=a.shape.getConstraints(a.style,c,d);if(null!=e)return e;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.getCurrentCellStyle(a),b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a])}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),e=0,c=0;c<b;c++){var d=this.model.getChildAt(a,c);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||e++)}return 0<e||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,b,e){for(var c=this.getCurrentCellStyle(a),d=!0,f=!0,g=0;g<b.length&&f;g++)d=d&&this.isTable(b[g]),
f=f&&this.isTableRow(b[g]);return("1"!=mxUtils.getValue(c,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||f||d)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
arguments);if(b&&null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);null!=e&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var e=this.getModel(),c=[];e.beginUpdate();
-try{for(var d=0;d<a.length;d++){var f=a[d];if(e.isEdge(f)){var g=e.getTerminal(f,!0),m=e.getTerminal(f,!1);e.setTerminal(f,m,!0);e.setTerminal(f,g,!1);var l=e.getGeometry(f);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var p=l.getTerminalPoint(!0),u=l.getTerminalPoint(!1);l.setTerminalPoint(p,!1);l.setTerminalPoint(u,!0);e.setGeometry(f,l);var t=this.view.getState(f),B=this.view.getState(g),k=this.view.getState(m);if(null!=t){var R=null!=B?this.getConnectionConstraint(t,B,!0):null,n=
-null!=k?this.getConnectionConstraint(t,k,!1):null;this.setConnectionConstraint(f,g,!0,n);this.setConnectionConstraint(f,m,!1,R)}c.push(f)}}else if(e.isVertex(f)&&(l=this.getCellGeometry(f),null!=l)){if(!this.isTable(f)&&!this.isTableRow(f)&&!this.isTableCell(f)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var v=l.width;l.width=l.height;l.height=v;e.setGeometry(f,l)}var y=this.view.getState(f);if(null!=y){var K=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
-mxConstants.DIRECTION_NORTH],x=mxUtils.getValue(y.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,K[mxUtils.mod(mxUtils.indexOf(K,x)+(b?-1:1),K.length)],[f])}c.push(f)}}}finally{e.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var m=Graph.prototype.processChange;
-Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var b=a.cell;this.isTableCell(b)&&(b=this.model.getParent(b));this.isTableRow(b)&&(b=this.model.getParent(b));var e=this.view.getState(b);null!=e&&null!=e.shape&&(this.view.invalidate(b),e.shape.bounds=null)}m.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&
+try{for(var d=0;d<a.length;d++){var f=a[d];if(e.isEdge(f)){var g=e.getTerminal(f,!0),n=e.getTerminal(f,!1);e.setTerminal(f,n,!0);e.setTerminal(f,g,!1);var l=e.getGeometry(f);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var u=l.getTerminalPoint(!0),p=l.getTerminalPoint(!1);l.setTerminalPoint(u,!1);l.setTerminalPoint(p,!0);e.setGeometry(f,l);var t=this.view.getState(f),B=this.view.getState(g),k=this.view.getState(n);if(null!=t){var R=null!=B?this.getConnectionConstraint(t,B,!0):null,m=
+null!=k?this.getConnectionConstraint(t,k,!1):null;this.setConnectionConstraint(f,g,!0,m);this.setConnectionConstraint(f,n,!1,R)}c.push(f)}}else if(e.isVertex(f)&&(l=this.getCellGeometry(f),null!=l)){if(!this.isTable(f)&&!this.isTableRow(f)&&!this.isTableCell(f)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var x=l.width;l.width=l.height;l.height=x;e.setGeometry(f,l)}var y=this.view.getState(f);if(null!=y){var K=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
+mxConstants.DIRECTION_NORTH],v=mxUtils.getValue(y.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,K[mxUtils.mod(mxUtils.indexOf(K,v)+(b?-1:1),K.length)],[f])}c.push(f)}}}finally{e.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var n=Graph.prototype.processChange;
+Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var b=a.cell;this.isTableCell(b)&&(b=this.model.getParent(b));this.isTableRow(b)&&(b=this.model.getParent(b));var e=this.view.getState(b);null!=e&&null!=e.shape&&(this.view.invalidate(b),e.shape.bounds=null)}n.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&
"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var e=this.view.getState(a[b]);null!=e&&null!=e.shape&&null!=e.shape.stencil&&this.stencilHasPlaceholders(e.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var e=a.ownerDocument.createElement(null!=
b?b:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)e.setAttribute(attr.nodeName,attr.nodeValue);e.innerHTML=a.innerHTML;a.parentNode.replaceChild(e,a)};Graph.prototype.processElements=function(a,b){if(null!=a)for(var e=a.getElementsByTagName("*"),c=0;c<e.length;c++)b(e[c])};Graph.prototype.updateLabelElements=function(a,b,e){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var f=this.convertValueToString(a[d]);
if(null!=f&&0<f.length){c.innerHTML=f;for(var g=c.getElementsByTagName(null!=e?e:"*"),l=0;l<g.length;l++)b(g[l]);c.innerHTML!=f&&this.cellLabelChanged(a[d],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,b,e){b=Graph.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&
@@ -2600,28 +2600,28 @@ a.sourceState;if(null==b||null==g.getLinkForCell(b.cell))a=g.getCellAt(a.getGrap
this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!g.intersects(this.currentState,b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b))}},mouseUp:function(a,c){for(var d=c.getSource(),l=c.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&
!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==b||b(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,l),c.consume())):null!=e&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-
c.getGraphY())<f&&e(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=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document,
-"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;for(var e=0;e<a.length;e++)this.isTableCell(a[e])&&(a[e]=this.model.getParent(a[e]));a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,f=[];c.beginUpdate();try{for(var g=this.cloneCells(a,!1,null,!0),e=0;e<a.length;e++){var l=c.getParent(a[e]),m=this.moveCells([g[e]],d,d,!1)[0];f.push(m);if(b)c.add(l,g[e]);else{var p=l.getIndex(a[e]);c.add(l,g[e],
-p+1)}if(this.isTable(l)){var u=this.getCellGeometry(g[e]),t=this.getCellGeometry(l);null!=u&&null!=t&&(t=t.clone(),t.height+=u.height,c.setGeometry(l,t))}}}finally{c.endUpdate()}return f};Graph.prototype.insertImage=function(a,b,e){if(null!=a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),d=[],f=0;f<c.length;f++)d.push(c[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(f=
+"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;for(var e=0;e<a.length;e++)this.isTableCell(a[e])&&(a[e]=this.model.getParent(a[e]));a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,f=[];c.beginUpdate();try{for(var g=this.cloneCells(a,!1,null,!0),e=0;e<a.length;e++){var l=c.getParent(a[e]),n=this.moveCells([g[e]],d,d,!1)[0];f.push(n);if(b)c.add(l,g[e]);else{var u=l.getIndex(a[e]);c.add(l,g[e],
+u+1)}if(this.isTable(l)){var p=this.getCellGeometry(g[e]),t=this.getCellGeometry(l);null!=p&&null!=t&&(t=t.clone(),t.height+=p.height,c.setGeometry(l,t))}}}finally{c.endUpdate()}return f};Graph.prototype.insertImage=function(a,b,e){if(null!=a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),d=[],f=0;f<c.length;f++)d.push(c[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(f=
a.length-1;0<=f;f--)if(0==f||a[f]!=d[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",e);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var b=this.cellEditor.textarea.getElementsByTagName("a"),e=[],c=0;c<b.length;c++)e.push(b[c]);document.execCommand("createlink",!1,mxUtils.trim(a));b=this.cellEditor.textarea.getElementsByTagName("a");if(b.length==e.length+1)for(c=b.length-
1;0<=c;c--)if(b[c]!=e[c-1]){for(b=b[c].getElementsByTagName("a");0<b.length;){for(e=b[0].parentNode;null!=b[0].firstChild;)e.insertBefore(b[0].firstChild,b[0]);e.removeChild(b[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),e=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(b||"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==
e[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var e=[],c=null,d=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,l):l,d=null!=d?Math.min(d,l):l;e.push(g)}}if(2<e.length){e.sort(function(b,e){return a?b.x-e.x:b.y-e.y});g=this.view.translate;l=this.view.scale;d=d/l-(a?g.x:g.y);c=c/l-(a?g.x:
-g.y);this.getModel().beginUpdate();try{for(var m=(c-d)/(e.length-1),c=d,f=1;f<e.length-1;f++){var p=this.view.getState(this.model.getParent(e[f].cell)),u=this.getCellGeometry(e[f].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(e[f].cell,u))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};
-Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,m,p){var u=this.useCssTransforms;u&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;e=null!=e?e:0;d=null!=d?d:!0;f=null!=f?f:!0;g=null!=g?g:!0;var t=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));
-var B=this.view.scale,k=mxUtils.createXmlDocument(),n=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=n.style?n.style.backgroundColor=a:n.setAttribute("style","background-color:"+a));null==k.createElementNS?(n.setAttribute("xmlns",mxConstants.NS_SVG),n.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/B;var v=Math.max(1,Math.ceil(t.width*a)+2*e)+(p?5:
-0),y=Math.max(1,Math.ceil(t.height*a)+2*e)+(p?5:0);n.setAttribute("version","1.1");n.setAttribute("width",v+"px");n.setAttribute("height",y+"px");n.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+v+" "+y);k.appendChild(n);var K=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"g"):k.createElement("g");n.appendChild(K);var x=this.createSvgCanvas(K);x.foOffset=d?-.5:0;x.textOffset=d?-.5:0;x.imageOffset=d?-.5:0;x.translate(Math.floor((e/b-t.x)/B),Math.floor((e/b-t.y)/B));var L=document.createElement("div"),
-H=x.getAlternateText;x.getAlternateText=function(a,b,e,c,d,f,g,l,m,p,aa,u,t){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(L.innerHTML=f,f=mxUtils.extractTextWithWhitespace(L.childNodes));for(var Na=Math.ceil(2*c/this.state.fontSize),B=[],k=0,n=0;(0==Na||k<Na)&&n<f.length;){var v=f.charCodeAt(n);if(10==v||13==v){if(0<k)break}else B.push(f.charAt(n)),255>v&&k++;n++}B.length<f.length&&1<f.length-B.length&&(f=mxUtils.trim(B.join(""))+"...");return f}catch(Va){return H.apply(this,
-arguments)}else return H.apply(this,arguments)};var R=this.backgroundImage;if(null!=R){b=B/b;var O=this.view.translate,z=new mxRectangle(O.x*b,O.y*b,R.width*b,R.height*b);mxUtils.intersects(t,z)&&x.image(O.x,O.y,R.width,R.height,R.src,!0)}x.scale(a);x.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,A=l.getLinkForCellState;l.getLinkForCellState=function(a,b){var e=A.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};l.drawCellState=function(a,b){for(var e=
-a.view.graph,c=e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!f&&!c&&null!=d;)c=e.isCellSelected(d),d=e.model.getParent(d);(f||c)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),x);this.updateSvgLinks(n,m,!0);this.addForeignObjectWarning(x,n);return n}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),
+g.y);this.getModel().beginUpdate();try{for(var n=(c-d)/(e.length-1),c=d,f=1;f<e.length-1;f++){var u=this.view.getState(this.model.getParent(e[f].cell)),p=this.getCellGeometry(e[f].cell),c=c+n;null!=p&&null!=u&&(p=p.clone(),a?p.x=Math.round(c-p.width/2)-u.origin.x:p.y=Math.round(c-p.height/2)-u.origin.y,this.getModel().setGeometry(e[f].cell,p))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};
+Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,n,u){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;e=null!=e?e:0;d=null!=d?d:!0;f=null!=f?f:!0;g=null!=g?g:!0;var t=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));
+var B=this.view.scale,k=mxUtils.createXmlDocument(),m=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=m.style?m.style.backgroundColor=a:m.setAttribute("style","background-color:"+a));null==k.createElementNS?(m.setAttribute("xmlns",mxConstants.NS_SVG),m.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):m.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/B;var x=Math.max(1,Math.ceil(t.width*a)+2*e)+(u?5:
+0),y=Math.max(1,Math.ceil(t.height*a)+2*e)+(u?5:0);m.setAttribute("version","1.1");m.setAttribute("width",x+"px");m.setAttribute("height",y+"px");m.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+x+" "+y);k.appendChild(m);var K=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"g"):k.createElement("g");m.appendChild(K);var v=this.createSvgCanvas(K);v.foOffset=d?-.5:0;v.textOffset=d?-.5:0;v.imageOffset=d?-.5:0;v.translate(Math.floor((e/b-t.x)/B),Math.floor((e/b-t.y)/B));var L=document.createElement("div"),
+H=v.getAlternateText;v.getAlternateText=function(a,b,e,c,d,f,g,l,n,u,ca,p,t){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(L.innerHTML=f,f=mxUtils.extractTextWithWhitespace(L.childNodes));for(var Na=Math.ceil(2*c/this.state.fontSize),B=[],k=0,m=0;(0==Na||k<Na)&&m<f.length;){var x=f.charCodeAt(m);if(10==x||13==x){if(0<k)break}else B.push(f.charAt(m)),255>x&&k++;m++}B.length<f.length&&1<f.length-B.length&&(f=mxUtils.trim(B.join(""))+"...");return f}catch(Va){return H.apply(this,
+arguments)}else return H.apply(this,arguments)};var R=this.backgroundImage;if(null!=R){b=B/b;var O=this.view.translate,A=new mxRectangle(O.x*b,O.y*b,R.width*b,R.height*b);mxUtils.intersects(t,A)&&v.image(O.x,O.y,R.width,R.height,R.src,!0)}v.scale(a);v.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,z=l.getLinkForCellState;l.getLinkForCellState=function(a,b){var e=z.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};l.drawCellState=function(a,b){for(var e=
+a.view.graph,c=e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!f&&!c&&null!=d;)c=e.isCellSelected(d),d=e.model.getParent(d);(f||c)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),v);this.updateSvgLinks(m,n,!0);this.addForeignObjectWarning(v,m);return m}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),
c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=
a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);e.appendChild(c);d.appendChild(f);e.appendChild(d);b.appendChild(e)}};Graph.prototype.updateSvgLinks=function(a,b,e){a=a.getElementsByTagName("a");for(var c=0;c<a.length;c++){var d=a[c].getAttribute("href");null==d&&(d=a[c].getAttribute("xlink:href"));null!=d&&(null!=b&&/^https?:\/\//.test(d)?a[c].setAttribute("target",
b):e&&this.isCustomLink(d)&&a[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,e){for(;null!=
a&&a.nodeName!=b;){if(a==e)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,e){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==e)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var e=document.createRange();e.selectNode(a);b.removeAllRanges();b.addRange(e)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),e=
b.createRange(),e.setEndPoint("StartToStart",a),e.select())};Graph.prototype.deleteCells=function(a,b){var e=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++){var d=this.model.getParent(a[c]);if(this.isTable(d)){var f=this.getCellGeometry(a[c]),g=this.getCellGeometry(d);null!=f&&null!=g&&(g=g.clone(),g.height-=f.height,this.model.setGeometry(d,g))}}var l=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,b)}finally{this.model.endUpdate()}if(null!=
l)for(e=[],c=0;c<l.length;c++)this.model.contains(l[c])&&(this.model.isVertex(l[c])||this.model.isEdge(l[c]))&&e.push(l[c])}return e};Graph.prototype.insertTableColumn=function(a,b){var e=this.getModel();e.beginUpdate();try{var c=a,d=0;if(this.isTableCell(a))var f=e.getParent(a),c=e.getParent(f),d=mxUtils.indexOf(e.getChildCells(f,!0),a);else this.isTableRow(a)?c=e.getParent(a):a=e.getChildCells(c,!0)[0],b||(d=e.getChildCells(a,!0).length-1);for(var g=e.getChildCells(c,!0),l=Graph.minTableColumnWidth,
-f=0;f<g.length;f++){var m=e.getChildCells(g[f],!0)[d],p=e.cloneCell(m,!1),u=this.getCellGeometry(p);p.value=null;if(null!=u){var l=u.width,t=this.getCellGeometry(g[f]);null!=t&&(u.height=t.height)}e.add(g[f],p,d+(b?0:1))}var B=this.getCellGeometry(c);null!=B&&(B=B.clone(),B.width+=l,e.setGeometry(c,B))}finally{e.endUpdate()}};Graph.prototype.insertTableRow=function(a,b){var e=this.getModel();e.beginUpdate();try{var c=a,d=a;if(this.isTableCell(a))d=e.getParent(a),c=e.getParent(d);else if(this.isTableRow(a))c=
-e.getParent(a);else var f=e.getChildCells(c,!0),d=f[b?0:f.length-1];var g=e.getChildCells(d,!0),l=c.getIndex(d),d=e.cloneCell(d,!1);d.value=null;var m=this.getCellGeometry(d);if(null!=m){for(f=0;f<g.length;f++){a=e.cloneCell(g[f],!1);d.insert(a);a.value=null;var p=this.getCellGeometry(a);null!=p&&(p.height=m.height)}e.add(c,d,l+(b?0:1));var u=this.getCellGeometry(c);null!=u&&(u=u.clone(),u.height+=m.height,e.setGeometry(c,u))}}finally{e.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var b=
-this.getModel();b.beginUpdate();try{var e=a,c=a;this.isTableCell(a)&&(c=b.getParent(a));this.isTableRow(c)&&(e=b.getParent(c));var d=b.getChildCells(e,!0);if(0==d.length)b.remove(e);else{this.isTableRow(c)||(c=d[0]);var f=b.getChildCells(c,!0);if(1>=f.length)b.remove(e);else{var g=f.length-1;this.isTableCell(a)&&(g=mxUtils.indexOf(f,a));for(c=a=0;c<d.length;c++){var l=b.getChildCells(d[c],!0)[g];b.remove(l);var m=this.getCellGeometry(l);null!=m&&(a=Math.max(a,m.width))}var p=this.getCellGeometry(e);
-null!=p&&(p=p.clone(),p.width-=a,b.setGeometry(e,p))}}}finally{b.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var b=this.getModel();b.beginUpdate();try{var e=a,c=a;this.isTableCell(a)&&(a=c=b.getParent(a));this.isTableRow(a)&&(e=b.getParent(c));var d=b.getChildCells(e,!0);if(1>=d.length)b.remove(e);else{this.isTableRow(c)||(c=d[d.length-1]);b.remove(c);a=0;var f=this.getCellGeometry(c);null!=f&&(a=f.height);var g=this.getCellGeometry(e);null!=g&&(g=g.clone(),g.height-=a,b.setGeometry(e,
+f=0;f<g.length;f++){var n=e.getChildCells(g[f],!0)[d],u=e.cloneCell(n,!1),p=this.getCellGeometry(u);u.value=null;if(null!=p){var l=p.width,t=this.getCellGeometry(g[f]);null!=t&&(p.height=t.height)}e.add(g[f],u,d+(b?0:1))}var B=this.getCellGeometry(c);null!=B&&(B=B.clone(),B.width+=l,e.setGeometry(c,B))}finally{e.endUpdate()}};Graph.prototype.insertTableRow=function(a,b){var e=this.getModel();e.beginUpdate();try{var c=a,d=a;if(this.isTableCell(a))d=e.getParent(a),c=e.getParent(d);else if(this.isTableRow(a))c=
+e.getParent(a);else var f=e.getChildCells(c,!0),d=f[b?0:f.length-1];var g=e.getChildCells(d,!0),l=c.getIndex(d),d=e.cloneCell(d,!1);d.value=null;var n=this.getCellGeometry(d);if(null!=n){for(f=0;f<g.length;f++){a=e.cloneCell(g[f],!1);d.insert(a);a.value=null;var u=this.getCellGeometry(a);null!=u&&(u.height=n.height)}e.add(c,d,l+(b?0:1));var p=this.getCellGeometry(c);null!=p&&(p=p.clone(),p.height+=n.height,e.setGeometry(c,p))}}finally{e.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var b=
+this.getModel();b.beginUpdate();try{var e=a,c=a;this.isTableCell(a)&&(c=b.getParent(a));this.isTableRow(c)&&(e=b.getParent(c));var d=b.getChildCells(e,!0);if(0==d.length)b.remove(e);else{this.isTableRow(c)||(c=d[0]);var f=b.getChildCells(c,!0);if(1>=f.length)b.remove(e);else{var g=f.length-1;this.isTableCell(a)&&(g=mxUtils.indexOf(f,a));for(c=a=0;c<d.length;c++){var l=b.getChildCells(d[c],!0)[g];b.remove(l);var n=this.getCellGeometry(l);null!=n&&(a=Math.max(a,n.width))}var u=this.getCellGeometry(e);
+null!=u&&(u=u.clone(),u.width-=a,b.setGeometry(e,u))}}}finally{b.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var b=this.getModel();b.beginUpdate();try{var e=a,c=a;this.isTableCell(a)&&(a=c=b.getParent(a));this.isTableRow(a)&&(e=b.getParent(c));var d=b.getChildCells(e,!0);if(1>=d.length)b.remove(e);else{this.isTableRow(c)||(c=d[d.length-1]);b.remove(c);a=0;var f=this.getCellGeometry(c);null!=f&&(a=f.height);var g=this.getCellGeometry(e);null!=g&&(g=g.clone(),g.height-=a,b.setGeometry(e,
g))}}finally{b.endUpdate()}};Graph.prototype.insertRow=function(a,b){for(var e=a.tBodies[0],c=e.rows[0].cells,d=0,f=0;f<c.length;f++)var g=c[f].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);e=e.insertRow(b);for(f=0;f<d;f++)mxUtils.br(e.insertCell(-1));return e.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var e=a.tHead;if(null!=e)for(var c=0;c<e.rows.length;c++){var d=document.createElement("th");e.rows[c].appendChild(d);
mxUtils.br(d)}e=a.tBodies[0];for(c=0;c<e.rows.length;c++)d=e.rows[c].insertCell(b),mxUtils.br(d);return e.rows[0].cells[0<=b?b:e.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var e=a.tBodies[0].rows,c=0;c<e.length;c++)e[c].cells.length>b&&e[c].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var e=document.createElement("div");e.innerHTML=
a;a=document.createDocumentFragment();for(var c;c=e.firstChild;)lastNode=a.appendChild(c);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){function e(a,b){a.length>b&&(a=a.substring(0,Math.round(b/2))+"..."+a.substring(a.length-Math.round(b/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==b||0==b.length)b=this.isCustomLink(a)?this.getLinkTitle(a):a;var c=document.createElement("a");c.setAttribute("rel",
@@ -2630,39 +2630,39 @@ this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideM
this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,e=!1,c=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),e=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&
(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(d.getEvent())&&(e&&null==d.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",
this.textarea)};mxCellEditor.prototype.alignText=function(a,b){var e=null!=b&&mxEvent.isShiftDown(b);if(e||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,function(a){e||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=
-window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],e=0,c=a.rangeCount;e<c;++e)b.push(a.getRangeAt(e));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,e=a.length;b<e;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(qa){}};var v=mxCellRenderer.prototype.initializeLabel;
-mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));v.apply(this,arguments)};var t=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?t.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
+window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],e=0,c=a.rangeCount;e<c;++e)b.push(a.getRangeAt(e));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,e=a.length;b<e;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(qa){}};var x=mxCellRenderer.prototype.initializeLabel;
+mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));x.apply(this,arguments)};var t=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?t.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
!1;var y=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){a=this.graph.getStartEditingCell(a,b);y.apply(this,arguments);var e=this.graph.view.getState(a);this.textarea.className=null!=e&&1==e.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var e=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(e)&&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 x=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,e){e.originalNode=a;a=a.firstChild;for(var c=e.firstChild;null!=a&&null!=c;)b(a,
+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 v=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,e){e.originalNode=a;a=a.firstChild;for(var c=e.firstChild;null!=a&&null!=c;)b(a,
c),a=a.nextSibling,c=c.nextSibling;return e}function e(a,b){if(null!=a)if(b.originalNode!=a)c(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var d=a.nextSibling;null==b?c(a):(e(a,b),b=b.nextSibling);a=d}}function c(a){for(var b=a.firstChild;null!=b;){var e=b.nextSibling;c(b);b=e}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)}x.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
-0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?e(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),e=this.saveSelection();if(this.codeViewMode){m=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(b?
-m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&
+(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}v.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
+0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?e(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),e=this.saveSelection();if(this.codeViewMode){n=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<n.length&&"\n"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=this.graph.sanitizeHtml(b?
+n.replace(/\n/g,"<br/>"):n,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&
mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+
-"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m,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 m=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(m=mxUtils.replaceTrailingNewlines(m,"<div><br></div>"));m=this.graph.sanitizeHtml(b?m.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):m,!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!=m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
+"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==
+this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var n=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(n=mxUtils.replaceTrailingNewlines(n,"<div><br></div>"));n=this.graph.sanitizeHtml(b?n.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):n,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+
+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
this.switchSelectionState=e;this.resize()}};var D=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var e=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*e;this.bounds.height=60*e;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)/e)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/e)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/e)+(this.textarea.offsetHeight-
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*e);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/e)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*e);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=e:mxUtils.setPrefixedStyle(this.textarea.style,
"transform","scale("+e+","+e+")")}else this.textarea.style.height="",this.textarea.style.overflow="",D.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var e=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g,"<br/>"));return e=this.graph.sanitizeHtml(e,!0)};
-mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var A=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
-this.toggleViewMode();A.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(R){}};var C=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{C.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};
+mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var z=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
+this.toggleViewMode();z.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(R){}};var C=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{C.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};
mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;
return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(a,b){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(b.getEvent)};mxGraphView.prototype.formatUnitText=function(a){return a?c(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=
a(),this.graph.container.appendChild(this.hint));var e=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-e.x);e=this.roundLength((this.bounds.y+this.currentDy)/d-e.y);d=this.graph.view.unit;this.hint.innerHTML=c(b,d)+", "+c(e,d);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=
-function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,b){z.apply(this,arguments);var e=this.graph.getCellStyle(a);if(null==e.childLayout){var c=this.graph.model.getParent(a),d=null!=c?this.graph.getCellGeometry(c):null;null!=d&&(e=this.graph.getCellStyle(c),"stackLayout"==e.childLayout&&(e="1"==mxUtils.getValue(e,"horizontalStack","1"),d=d.clone(),e?d.height=b.height:d.width=
+function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var A=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,b){A.apply(this,arguments);var e=this.graph.getCellStyle(a);if(null==e.childLayout){var c=this.graph.model.getParent(a),d=null!=c?this.graph.getCellGeometry(c):null;null!=d&&(e=this.graph.getCellStyle(c),"stackLayout"==e.childLayout&&(e="1"==mxUtils.getValue(e,"horizontalStack","1"),d=d.clone(),e?d.height=b.height:d.width=
b.width,this.graph.model.setGeometry(c,d)))}};var E=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){e.get(a)||(e.put(a,!0),d.push(a))}for(var b=E.apply(this,arguments),e=new mxDictionary,c=this.graph.model,d=[],f=0;f<b.length;f++){var g=b[f];this.graph.isTableCell(g)?a(c.getParent(c.getParent(g))):this.graph.isTableRow(g)&&a(c.getParent(g));a(g)}return d};var G=mxVertexHandler.prototype.createParentHighlightShape;
mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=G.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};var F=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var b=F.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+
this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(b.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,
"childLayout",null))&&mxEvent.isControlDown(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var I=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return I.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
this.bounds};var J=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return J.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var u=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||u.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
function(){var a=0;this.graph.isTableRow(this.state.cell)?a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var K=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return K.apply(this,arguments).grow(-this.getSelectionBorderInset())};var B=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var b=this.graph,
-e=b.model,c=this.state,d=this.selectionBorder,f=this;null==a&&(a=[]);var g=b.view.getCellStates(e.getChildCells(this.state.cell,!0));if(0<g.length){for(var l=b.view.getCellStates(e.getChildCells(g[0].cell,!0)),e=0;e<l.length;e++)mxUtils.bind(this,function(e){var g=l[e],m=e<l.length-1?l[e+1]:null,p=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);p.isDashed=d.isDashed;p.svgStrokeTolerance++;p=new mxHandle(g,"col-resize",null,p);p.tableHandle=!0;var u=0;p.shape.node.parentNode.insertBefore(p.shape.node,
-p.shape.node.parentNode.firstChild);p.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=b.getActualStartSize(c.cell);this.shape.stroke=0==u?mxConstants.NONE:d.stroke;this.shape.bounds.x=this.state.x+this.state.width+u*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(e==l.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=c.height-(e==l.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var t=!1;p.setPosition=function(a,e,c){u=
-Math.max(Graph.minTableColumnWidth-a.width,e.x-a.x-a.width);t=mxEvent.isShiftDown(c.getEvent());null==m||t||(u=Math.min((m.x+m.width-g.x-g.width)/b.view.scale-Graph.minTableColumnWidth,u))};p.execute=function(a){if(0!=u)b.setTableColumnWidth(this.state.cell,u,t);else if(!f.blockDelayedSelection){var e=b.getCellAt(a.getGraphX(),a.getGraphY())||c.cell;b.graphHandler.selectCellForEvent(e,a)}u=0};p.reset=function(){u=0};a.push(p)})(e);for(e=0;e<g.length;e++)mxUtils.bind(this,function(e){e=g[e];var l=
-new mxLine(new mxRectangle,mxConstants.NONE,1);l.isDashed=d.isDashed;l.svgStrokeTolerance++;e=new mxHandle(e,"row-resize",null,l);e.tableHandle=!0;var m=0;e.shape.node.parentNode.insertBefore(e.shape.node,e.shape.node.parentNode.firstChild);e.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,
-this.shape.bounds.height=1,this.shape.redraw())};e.setPosition=function(a,b,e){m=Math.max(Graph.minTableRowHeight-a.height,b.y-a.y-a.height)};e.execute=function(a){if(0!=m)b.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(a.getEvent()));else if(!f.blockDelayedSelection){var e=b.getCellAt(a.getGraphX(),a.getGraphY())||c.cell;b.graphHandler.selectCellForEvent(e,a)}m=0};e.reset=function(){m=0};a.push(e)})(e)}}return null!=a?a.reverse():null};var L=mxVertexHandler.prototype.setHandlesVisible;
+e=b.model,c=this.state,d=this.selectionBorder,f=this;null==a&&(a=[]);var g=b.view.getCellStates(e.getChildCells(this.state.cell,!0));if(0<g.length){for(var l=b.view.getCellStates(e.getChildCells(g[0].cell,!0)),e=0;e<l.length;e++)mxUtils.bind(this,function(e){var g=l[e],n=e<l.length-1?l[e+1]:null,u=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);u.isDashed=d.isDashed;u.svgStrokeTolerance++;u=new mxHandle(g,"col-resize",null,u);u.tableHandle=!0;var p=0;u.shape.node.parentNode.insertBefore(u.shape.node,
+u.shape.node.parentNode.firstChild);u.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=b.getActualStartSize(c.cell);this.shape.stroke=0==p?mxConstants.NONE:d.stroke;this.shape.bounds.x=this.state.x+this.state.width+p*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(e==l.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=c.height-(e==l.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var t=!1;u.setPosition=function(a,e,c){p=
+Math.max(Graph.minTableColumnWidth-a.width,e.x-a.x-a.width);t=mxEvent.isShiftDown(c.getEvent());null==n||t||(p=Math.min((n.x+n.width-g.x-g.width)/b.view.scale-Graph.minTableColumnWidth,p))};u.execute=function(a){if(0!=p)b.setTableColumnWidth(this.state.cell,p,t);else if(!f.blockDelayedSelection){var e=b.getCellAt(a.getGraphX(),a.getGraphY())||c.cell;b.graphHandler.selectCellForEvent(e,a)}p=0};u.reset=function(){p=0};a.push(u)})(e);for(e=0;e<g.length;e++)mxUtils.bind(this,function(e){e=g[e];var l=
+new mxLine(new mxRectangle,mxConstants.NONE,1);l.isDashed=d.isDashed;l.svgStrokeTolerance++;e=new mxHandle(e,"row-resize",null,l);e.tableHandle=!0;var n=0;e.shape.node.parentNode.insertBefore(e.shape.node,e.shape.node.parentNode.firstChild);e.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==n?mxConstants.NONE:d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+n*this.graph.view.scale,
+this.shape.bounds.height=1,this.shape.redraw())};e.setPosition=function(a,b,e){n=Math.max(Graph.minTableRowHeight-a.height,b.y-a.y-a.height)};e.execute=function(a){if(0!=n)b.setTableRowHeight(this.state.cell,n,!mxEvent.isShiftDown(a.getEvent()));else if(!f.blockDelayedSelection){var e=b.getCellAt(a.getGraphX(),a.getGraphY())||c.cell;b.graphHandler.selectCellForEvent(e,a)}n=0};e.reset=function(){n=0};a.push(e)})(e)}}return null!=a?a.reverse():null};var L=mxVertexHandler.prototype.setHandlesVisible;
mxVertexHandler.prototype.setHandlesVisible=function(a){L.apply(this,arguments);if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var a=this.graph.model;if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);
this.moveHandles=null}this.moveHandles=[];for(b=0;b<a.getChildCount(this.state.cell);b++)mxUtils.bind(this,function(b){if(null!=b&&a.isVertex(b.cell)){var e=mxUtils.createImage(Editor.rowMoveImage);e.style.position="absolute";e.style.cursor="pointer";e.style.width="7px";e.style.height="4px";e.style.padding="4px 2px 4px 2px";e.rowState=b;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(b.cell)||
this.graph.selectCellForEvent(b.cell,a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),b.cell,a),mxEvent.consume(a))}));
@@ -2685,13 +2685,13 @@ function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mx
function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var fa=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){fa.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=
a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,b){if(this.cancelled)this.cancelled=!1,b.consume();else{var e=null!=this.div&&"none"!=this.div.style.display,c=null,d=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,d=this.first.y,f=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<
-this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(e){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(c,d,this.graph.getDefaultParent(),!0,!0),e=0;e<l.length;e++)if(this.graph.isCellMovable(l[e])){var m=
-this.graph.view.getState(l[e]),p=this.graph.getCellGeometry(l[e]);null!=m&&null!=p&&(p=p.clone(),p.translate(f,g),this.graph.model.setGeometry(l[e],p))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var e=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);e.x-=c.x;e.y-=c.y;
+this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(e){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(c,d,this.graph.getDefaultParent(),!0,!0),e=0;e<l.length;e++)if(this.graph.isCellMovable(l[e])){var n=
+this.graph.view.getState(l[e]),u=this.graph.getCellGeometry(l[e]);null!=n&&null!=u&&(u=u.clone(),u.translate(f,g),this.graph.model.setGeometry(l[e],u))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var e=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);e.x-=c.x;e.y-=c.y;
var c=b.getX()+e.x,e=b.getY()+e.y,d=this.first.x-c,f=this.first.y-e,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,e),this.isSpaceEvent(b)?(c=this.x+this.width,e=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=e-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null)),b.consume()}};var ga=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ga.apply(this,arguments)};var ba=(new Date).getTime(),Y=0,X=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,e,c){X.apply(this,arguments);e!=this.currentTerminalState?(ba=(new Date).getTime(),Y=0):Y=(new Date).getTime()-ba;this.currentTerminalState=
-e};var ca=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<Y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ca.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,b){var e=null!=a&&0==a,c=this.state.getVisibleTerminalState(e),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-
+this.secondDiv=null)),b.consume()}};var ga=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ga.apply(this,arguments)};var aa=(new Date).getTime(),Y=0,X=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,e,c){X.apply(this,arguments);e!=this.currentTerminalState?(aa=(new Date).getTime(),Y=0):Y=(new Date).getTime()-aa;this.currentTerminalState=
+e};var ba=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<Y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ba.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,b){var e=null!=a&&0==a,c=this.state.getVisibleTerminalState(e),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-
1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,e):null,e=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(e),d):null)?this.fixedHandleImage:null!=d&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=e)return e=new mxImageShape(new mxRectangle(0,0,e.width,e.height),e.src),e.preserveImageAspect=!1,e;e=mxConstants.HANDLE_SIZE;this.preferHtml&&--e;return new mxRectangleShape(new mxRectangle(0,0,e,e),mxConstants.HANDLE_FILLCOLOR,
mxConstants.HANDLE_STROKECOLOR)};var ha=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,e){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return ha.apply(this,arguments)};var ea=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),e=b.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);
if(b.isEdge(e)&&null!=c&&c.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return ea.apply(this,arguments)};var U=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=U.apply(this,arguments),b=[],e=0;e<a.length;e++)"1"!=mxUtils.getValue(a[e].style,"part","0")&&b.push(a[e]);return b};var da=mxVertexHandler.prototype.getSelectionBounds;
@@ -2715,80 +2715,80 @@ null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&thi
this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=0;a<this.cornerHandles.length;a++)null!=this.cornerHandles[a]&&null!=this.cornerHandles[a].node&&null!=this.cornerHandles[a].node.parentNode&&this.cornerHandles[a].node.parentNode.removeChild(this.cornerHandles[a].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var oa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(oa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&
null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var W=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Z=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=
-function(){Z.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function q(){mxActor.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function m(){mxActor.call(this)}function l(){mxActor.call(this)}function v(){mxActor.call(this)}function t(){mxActor.call(this)}
+function(){Z.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function q(){mxActor.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function l(){mxActor.call(this)}function x(){mxActor.call(this)}function t(){mxActor.call(this)}
function y(a,b){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,y.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,y.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,y.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,y.prototype.quadTo);this.originalCurveTo=
-this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,y.prototype.arcTo)}function x(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function C(){mxActor.call(this)}function z(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function I(){mxShape.call(this)}function J(){mxShape.call(this)}
-function u(){mxEllipse.call(this)}function K(){mxShape.call(this)}function B(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function O(){mxShape.call(this)}function H(){mxShape.call(this)}function S(){mxShape.call(this)}function fa(){mxShape.call(this)}function ga(){mxShape.call(this)}function ba(){mxCylinder.call(this)}function Y(){mxCylinder.call(this)}function X(){mxRectangleShape.call(this)}function ca(){mxDoubleEllipse.call(this)}function ha(){mxDoubleEllipse.call(this)}function ea(){mxArrowConnector.call(this);
+this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,y.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function C(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function I(){mxShape.call(this)}function J(){mxShape.call(this)}
+function u(){mxEllipse.call(this)}function K(){mxShape.call(this)}function B(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function O(){mxShape.call(this)}function H(){mxShape.call(this)}function S(){mxShape.call(this)}function fa(){mxShape.call(this)}function ga(){mxShape.call(this)}function aa(){mxCylinder.call(this)}function Y(){mxCylinder.call(this)}function X(){mxRectangleShape.call(this)}function ba(){mxDoubleEllipse.call(this)}function ha(){mxDoubleEllipse.call(this)}function ea(){mxArrowConnector.call(this);
this.spacing=0}function U(){mxArrowConnector.call(this);this.spacing=0}function da(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}function la(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxActor.call(this)}function ja(){mxActor.call(this)}function sa(){mxActor.call(this)}function N(){mxActor.call(this)}function oa(){mxActor.call(this)}function W(){mxActor.call(this)}function Z(){mxActor.call(this)}function R(){mxEllipse.call(this)}
-function ia(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxActor.call(this)}function ya(){mxActor.call(this)}function ma(){mxActor.call(this)}function ta(){mxConnector.call(this)}function Ba(a,b,e,c,d,f,g,l,m,p){g+=m;var aa=c.clone();c.x-=d*(2*g+m);c.y-=f*(2*g+m);d*=g+m;f*=g+m;return function(){a.ellipse(aa.x-
-d-g,aa.y-f-g,2*g,2*g);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,b,e,c,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-b,-e));this.paintForeground(a,
-b,e,c,d)};a.prototype.paintForeground=function(a,b,e,c,d){if(null!=this.state){var f=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var aa=f,f=g,g=aa;a.rotate(-this.getShapeRotation(),f,g,b+c/2,e+d/2);s=this.scale;b=this.bounds.x/s;e=this.bounds.y/s;c=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,b,e,c,d)}};a.prototype.paintTableForeground=function(a,b,e,c,d){var f=this.state.view.graph,g=f.getActualStartSize(this.state.cell),
-aa=f.model.getChildCells(this.state.cell,!0);if(0<aa.length){var l="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(l)for(l=1;l<aa.length;l++){var p=f.getCellGeometry(aa[l]);null!=p&&(a.begin(),a.moveTo(b+g.x,e+p.y),a.lineTo(b+c-g.width,e+p.y),a.end(),a.stroke())}if(m)for(c=f.model.getChildCells(aa[0],!0),l=1;l<c.length;l++)p=f.getCellGeometry(c[l]),null!=p&&(a.begin(),a.moveTo(b+p.x+g.x,e+g.y),a.lineTo(b+p.x+g.x,e+d-g.height),a.end(),
-a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.max(0,Math.min(c,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),aa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
-a.translate(b,e);a.begin();a.moveTo(0,0);a.lineTo(c-f,0);a.lineTo(c,f);a.lineTo(c,d);a.lineTo(f,d);a.lineTo(0,d-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(c-f,0),a.lineTo(c,f),a.lineTo(f,f),a.close(),a.fill()),0!=aa&&(a.setFillAlpha(Math.abs(aa)),a.setFillColor(0>aa?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,d),a.lineTo(0,d-
+function ia(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxActor.call(this)}function ya(){mxActor.call(this)}function ma(){mxActor.call(this)}function ta(){mxConnector.call(this)}function Ba(a,b,e,c,d,f,g,l,n,u){g+=n;var ca=c.clone();c.x-=d*(2*g+n);c.y-=f*(2*g+n);d*=g+n;f*=g+n;return function(){a.ellipse(ca.x-
+d-g,ca.y-f-g,2*g,2*g);u?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,b,e,c,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-b,-e));this.paintForeground(a,
+b,e,c,d)};a.prototype.paintForeground=function(a,b,e,c,d){if(null!=this.state){var f=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var ca=f,f=g,g=ca;a.rotate(-this.getShapeRotation(),f,g,b+c/2,e+d/2);s=this.scale;b=this.bounds.x/s;e=this.bounds.y/s;c=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,b,e,c,d)}};a.prototype.paintTableForeground=function(a,b,e,c,d){var f=this.state.view.graph,g=f.getActualStartSize(this.state.cell),
+ca=f.model.getChildCells(this.state.cell,!0);if(0<ca.length){var l="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),n="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(l)for(l=1;l<ca.length;l++){var u=f.getCellGeometry(ca[l]);null!=u&&(a.begin(),a.moveTo(b+g.x,e+u.y),a.lineTo(b+c-g.width,e+u.y),a.end(),a.stroke())}if(n)for(c=f.model.getChildCells(ca[0],!0),l=1;l<c.length;l++)u=f.getCellGeometry(c[l]),null!=u&&(a.begin(),a.moveTo(b+u.x+g.x,e+g.y),a.lineTo(b+u.x+g.x,e+d-g.height),a.end(),
+a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.max(0,Math.min(c,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ca=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
+a.translate(b,e);a.begin();a.moveTo(0,0);a.lineTo(c-f,0);a.lineTo(c,f);a.lineTo(c,d);a.lineTo(f,d);a.lineTo(0,d-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(c-f,0),a.lineTo(c,f),a.lineTo(f,f),a.close(),a.fill()),0!=ca&&(a.setFillAlpha(Math.abs(ca)),a.setFillColor(0>ca?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,d),a.lineTo(0,d-
f),a.close(),a.fill()),a.begin(),a.moveTo(f,d),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(c,f),a.end(),a.stroke())};c.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",c);var ua=Math.tan(mxUtils.toRadians(30)),na=(.5-ua)/2;mxUtils.extend(f,mxActor);f.prototype.size=20;f.prototype.redrawPath=function(a,b,e,c,d){b=
Math.min(c,d/ua);a.translate((c-b)/2,(d-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*na);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-na)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",f);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,e,c,d,f){b=Math.min(c,d/(.5+ua));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-na)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-na)*b),a.lineTo(.5*b,(1-na)*b)):(a.translate((c-b)/2,(d-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*
b,b*na),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-na)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(a,b,e,c,d,f){b=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,c,2*b,c,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,c,2*b,c,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),
-a.curveTo(0,2*b,c,2*b,c,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,c,-b/3,c,b),a.lineTo(c,d-b),a.curveTo(c,d+b/3,0,d+b/3,0,d-b),a.close())};k.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",k);mxUtils.extend(n,mxCylinder);n.prototype.size=30;n.prototype.darkOpacity=0;n.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.max(0,
+a.curveTo(0,2*b,c,2*b,c,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,c,-b/3,c,b),a.lineTo(c,d-b),a.curveTo(c,d+b/3,0,d+b/3,0,d-b),a.close())};k.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",k);mxUtils.extend(m,mxCylinder);m.prototype.size=30;m.prototype.darkOpacity=0;m.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.max(0,
Math.min(c,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,e);a.begin();a.moveTo(0,0);a.lineTo(c-f,0);a.lineTo(c,f);a.lineTo(c,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(c-f,0),a.lineTo(c-f,f),a.lineTo(c,f),a.close(),
-a.fill()),a.begin(),a.moveTo(c-f,0),a.lineTo(c-f,f),a.lineTo(c,f),a.end(),a.stroke())};mxCellRenderer.registerShape("note",n);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,e,c,d){a.moveTo(0,0);a.quadTo(c/2,.5*d,c,0);a.quadTo(.5*c,d/2,c,d);a.quadTo(c/2,.5*d,0,d);a.quadTo(.5*c,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(b,mxCylinder);b.prototype.tabWidth=60;b.prototype.tabHeight=20;b.prototype.tabPosition="right";b.prototype.redrawPath=function(a,b,e,c,
+a.fill()),a.begin(),a.moveTo(c-f,0),a.lineTo(c-f,f),a.lineTo(c,f),a.end(),a.stroke())};mxCellRenderer.registerShape("note",m);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,e,c,d){a.moveTo(0,0);a.quadTo(c/2,.5*d,c,0);a.quadTo(.5*c,d/2,c,d);a.quadTo(c/2,.5*d,0,d);a.quadTo(.5*c,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(b,mxCylinder);b.prototype.tabWidth=60;b.prototype.tabHeight=20;b.prototype.tabPosition="right";b.prototype.redrawPath=function(a,b,e,c,
d,f){b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);f?"left"==g?(a.moveTo(0,e),a.lineTo(b,e)):(a.moveTo(c-b,e),a.lineTo(c,e)):("left"==g?(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,e),a.lineTo(c,e)):(a.moveTo(0,e),a.lineTo(c-b,e),a.lineTo(c-b,0),a.lineTo(c,0)),a.lineTo(c,d),a.lineTo(0,d),a.lineTo(0,
e),a.close());a.end()};mxCellRenderer.registerShape("folder",b);mxUtils.extend(e,mxActor);e.prototype.size=30;e.prototype.isRoundable=function(){return!0};e.prototype.redrawPath=function(a,b,e,c,d){b=Math.max(0,Math.min(c,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint(0,d),new mxPoint(0,b)],this.isRounded,e,!0);
a.end()};mxCellRenderer.registerShape("card",e);mxUtils.extend(g,mxActor);g.prototype.size=.4;g.prototype.redrawPath=function(a,b,e,c,d){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(c/4,1.4*b,c/2,b/2);a.quadTo(3*c/4,b*(1-1.4),c,b/2);a.lineTo(c,d-b/2);a.quadTo(3*c/4,d-1.4*b,c/2,d-b/2);a.quadTo(c/4,d-b*(1-1.4),0,d-b/2);a.lineTo(0,b/2);a.close();a.end()};g.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",
!1)){var b=mxUtils.getValue(this.style,"size",this.size),e=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=c,new mxRectangle(a.x,a.y+b,e,c-2*b);b*=e;return new mxRectangle(a.x+b,a.y,e-2*b,c)}return a};mxCellRenderer.registerShape("tape",g);mxUtils.extend(p,mxActor);p.prototype.size=.3;p.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};p.prototype.redrawPath=function(a,b,e,c,d){b=d*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,d-b/2);a.quadTo(3*c/4,d-1.4*b,c/2,d-b/2);a.quadTo(c/4,d-b*(1-1.4),0,d-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",p);var Ia=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,e,c){var d=mxUtils.getValue(this.style,"size");return null!=
-d?c*Math.max(0,Math.min(1,d)):Ia.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c-b,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(l,mxActor);l.prototype.size=.2;l.prototype.isRoundable=function(){return!0};l.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,d)],this.isRounded,e,!0)};mxCellRenderer.registerShape("trapezoid",l);mxUtils.extend(v,mxActor);v.prototype.size=.5;v.prototype.redrawPath=function(a,b,e,c,d){a.setFillColor(null);b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d/2),new mxPoint(0,d/2),new mxPoint(b,d/2),new mxPoint(b,d),new mxPoint(c,d)],this.isRounded,e,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",v);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,e,c,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=c/5;a.rect(0,0,b,d);a.fillAndStroke();a.rect(2*b,0,b,d);a.fillAndStroke();a.rect(4*b,0,b,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);y.prototype.moveTo=
+d?c*Math.max(0,Math.min(1,d)):Ia.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.isRoundable=function(){return!0};n.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
+e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c-b,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("parallelogram",n);mxUtils.extend(l,mxActor);l.prototype.size=.2;l.prototype.isRoundable=function(){return!0};l.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,d)],this.isRounded,e,!0)};mxCellRenderer.registerShape("trapezoid",l);mxUtils.extend(x,mxActor);x.prototype.size=.5;x.prototype.redrawPath=function(a,b,e,c,d){a.setFillColor(null);b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d/2),new mxPoint(0,d/2),new mxPoint(b,d/2),new mxPoint(b,d),new mxPoint(c,d)],this.isRounded,e,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",x);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,e,c,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=c/5;a.rect(0,0,b,d);a.fillAndStroke();a.rect(2*b,0,b,d);a.fillAndStroke();a.rect(4*b,0,b,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);y.prototype.moveTo=
function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};y.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)};y.prototype.quadTo=function(a,b,e,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=c};y.prototype.curveTo=function(a,b,e,c,d,f){this.originalCurveTo.apply(this.canvas,
-arguments);this.lastX=d;this.lastY=f};y.prototype.arcTo=function(a,b,e,c,d,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};y.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var e=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),d=Math.abs(b-this.lastY),f=Math.sqrt(c*c+d*d);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),aa=this.defaultVariation;
-5>g&&(g=5,aa/=3);for(var l=e(a-this.lastX)*c/g,e=e(b-this.lastY)*d/g,c=c/f,d=d/f,f=0;f<g;f++){var m=(Math.random()-.5)*aa;this.originalLineTo.call(this.canvas,l*f+this.lastX-m*d,e*f+this.lastY-m*c)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};y.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;
+arguments);this.lastX=d;this.lastY=f};y.prototype.arcTo=function(a,b,e,c,d,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};y.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var e=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),d=Math.abs(b-this.lastY),f=Math.sqrt(c*c+d*d);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),l=this.defaultVariation;
+5>g&&(g=5,l/=3);for(var ca=e(a-this.lastX)*c/g,e=e(b-this.lastY)*d/g,c=c/f,d=d/f,f=0;f<g;f++){var n=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,ca*f+this.lastX-n*d,e*f+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};y.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};mxShape.prototype.defaultJiggle=1.5;var Ja=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Ja.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Pa=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Pa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new y(a,
mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var Qa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?
"1":"0"))&&Qa.apply(this,arguments)};var Ra=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,e,c,d){if(null==a.handJiggle||a.handJiggle.constructor!=y)Ra.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),
a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(c/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(c*f,d*f)),a.moveTo(b+f,e),a.lineTo(b+c-f,e),a.quadTo(b+c,e,b+c,e+f),a.lineTo(b+c,e+d-f),a.quadTo(b+c,e+d,b+c-f,e+d),a.lineTo(b+f,e+d),a.quadTo(b,e+d,b,e+d-f),a.lineTo(b,e+f),a.quadTo(b,
-e,b+f,e)):(a.moveTo(b,e),a.lineTo(b+c,e),a.lineTo(b+c,e+d),a.lineTo(b,e+d),a.lineTo(b,e)),a.close(),a.end(),a.fillAndStroke()}};var Sa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,e,c,d){null==a.handJiggle&&Sa.apply(this,arguments)};mxUtils.extend(x,mxRectangleShape);x.prototype.size=.1;x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
-this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,e=a.height;a=new mxRectangle(a.x,a.y,b,e);var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(b*d,e*d));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};x.prototype.paintForeground=function(a,
-b,e,c,d){var f=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,f=Math.max(f,Math.min(c*g,d*g));f=Math.round(f);a.begin();a.moveTo(b+f,e);a.lineTo(b+f,e+d);a.moveTo(b+c-f,e);a.lineTo(b+c-f,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",x);mxUtils.extend(D,mxRectangleShape);
-D.prototype.paintBackground=function(a,b,e,c,d){a.setFillColor(mxConstants.NONE);a.rect(b,e,c,d);a.fill()};D.prototype.paintForeground=function(a,b,e,c,d){};mxCellRenderer.registerShape("transparent",D);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};A.prototype.isRoundable=function(){return!0};
-A.prototype.redrawPath=function(a,b,e,c,d){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,
-[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d-e),new mxPoint(Math.min(c,f+l),d-e),new mxPoint(g,d),new mxPoint(Math.max(0,f),d-e),new mxPoint(0,d-e)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,b,e,c,d){b="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))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-b,0),new mxPoint(c,d/2),new mxPoint(c-b,d),new mxPoint(0,d),new mxPoint(b,d/2)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("step",C);mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.prototype.fixedSize=20;z.prototype.isRoundable=function(){return!0};
-z.prototype.redrawPath=function(a,b,e,c,d){b="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))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,.5*d),new mxPoint(c-b,d),new mxPoint(b,d),new mxPoint(0,.5*d)],this.isRounded,e,!0)};
-mxCellRenderer.registerShape("hexagon",z);mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.paintForeground=function(a,b,e,c,d){var f=Math.min(c/5,d/5)+1;a.begin();a.moveTo(b+c/2,e+f);a.lineTo(b+c/2,e+d-f);a.moveTo(b+f,e+d/2);a.lineTo(b+c-f,e+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",E);var La=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
+e,b+f,e)):(a.moveTo(b,e),a.lineTo(b+c,e),a.lineTo(b+c,e+d),a.lineTo(b,e+d),a.lineTo(b,e)),a.close(),a.end(),a.fillAndStroke()}};var Sa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,e,c,d){null==a.handJiggle&&Sa.apply(this,arguments)};mxUtils.extend(v,mxRectangleShape);v.prototype.size=.1;v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
+this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,e=a.height;a=new mxRectangle(a.x,a.y,b,e);var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(b*d,e*d));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};v.prototype.paintForeground=function(a,
+b,e,c,d){var f=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,f=Math.max(f,Math.min(c*g,d*g));f=Math.round(f);a.begin();a.moveTo(b+f,e);a.lineTo(b+f,e+d);a.moveTo(b+c-f,e);a.lineTo(b+c-f,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",v);mxUtils.extend(D,mxRectangleShape);
+D.prototype.paintBackground=function(a,b,e,c,d){a.setFillColor(mxConstants.NONE);a.rect(b,e,c,d);a.fill()};D.prototype.paintForeground=function(a,b,e,c,d){};mxCellRenderer.registerShape("transparent",D);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};z.prototype.isRoundable=function(){return!0};
+z.prototype.redrawPath=function(a,b,e,c,d){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,
+[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d-e),new mxPoint(Math.min(c,f+l),d-e),new mxPoint(g,d),new mxPoint(Math.max(0,f),d-e),new mxPoint(0,d-e)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,b,e,c,d){b="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))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-b,0),new mxPoint(c,d/2),new mxPoint(c-b,d),new mxPoint(0,d),new mxPoint(b,d/2)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("step",C);mxUtils.extend(A,mxHexagon);A.prototype.size=.25;A.prototype.fixedSize=20;A.prototype.isRoundable=function(){return!0};
+A.prototype.redrawPath=function(a,b,e,c,d){b="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))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,.5*d),new mxPoint(c-b,d),new mxPoint(b,d),new mxPoint(0,.5*d)],this.isRounded,e,!0)};
+mxCellRenderer.registerShape("hexagon",A);mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.paintForeground=function(a,b,e,c,d){var f=Math.min(c/5,d/5)+1;a.begin();a.moveTo(b+c/2,e+f);a.lineTo(b+c/2,e+d-f);a.moveTo(b+f,e+d/2);a.lineTo(b+c-f,e+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",E);var La=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,e,c,d){La.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;e+=f;c-=2*f;d-=2*f;0<c&&0<d&&(a.setShadow(!1),La.apply(this,[a,b,e,c,d]))}};mxUtils.extend(G,
mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};G.prototype.paintForeground=function(a,b,e,c,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);b+=f;e+=f;c-=2*f;d-=2*f;0<c&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=g){var l=this.style["symbol"+f+"Align"],m=this.style["symbol"+f+"VerticalAlign"],p=this.style["symbol"+f+"Width"],aa=this.style["symbol"+f+"Height"],u=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"VSpacing"]||u,B=this.style["symbol"+f+"ArcSpacing"];null!=B&&(B*=this.getArcSize(c+this.strokewidth,
-d+this.strokewidth),u+=B,t+=B);var B=b,k=e,B=l==mxConstants.ALIGN_CENTER?B+(c-p)/2:l==mxConstants.ALIGN_RIGHT?B+(c-p-u):B+u,k=m==mxConstants.ALIGN_MIDDLE?k+(d-aa)/2:m==mxConstants.ALIGN_BOTTOM?k+(d-aa-t):k+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,B,k,p,aa);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",G);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,e,c,d,f){f?
+0);b+=f;e+=f;c-=2*f;d-=2*f;0<c&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=g){var l=this.style["symbol"+f+"Align"],n=this.style["symbol"+f+"VerticalAlign"],u=this.style["symbol"+f+"Width"],ca=this.style["symbol"+f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"VSpacing"]||p,B=this.style["symbol"+f+"ArcSpacing"];null!=B&&(B*=this.getArcSize(c+this.strokewidth,
+d+this.strokewidth),p+=B,t+=B);var B=b,k=e,B=l==mxConstants.ALIGN_CENTER?B+(c-u)/2:l==mxConstants.ALIGN_RIGHT?B+(c-u-p):B+p,k=n==mxConstants.ALIGN_MIDDLE?k+(d-ca)/2:n==mxConstants.ALIGN_BOTTOM?k+(d-ca-t):k+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,B,k,u,ca);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",G);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,e,c,d,f){f?
(a.moveTo(0,0),a.lineTo(c/2,d/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(I,mxShape);I.prototype.paintBackground=function(a,b,e,c,d){a.translate(b,e);a.ellipse(c/4,0,c/2,d/4);a.fillAndStroke();a.begin();a.moveTo(c/2,d/4);a.lineTo(c/2,2*d/3);a.moveTo(c/2,d/3);a.lineTo(0,d/3);a.moveTo(c/2,d/3);a.lineTo(c,d/3);a.moveTo(c/2,2*d/3);a.lineTo(0,d);a.moveTo(c/2,2*d/3);a.lineTo(c,d);a.end();a.stroke()};
mxCellRenderer.registerShape("umlActor",I);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};J.prototype.paintBackground=function(a,b,e,c,d){a.translate(b,e);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(c/6,d/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(u,mxEllipse);u.prototype.paintVertexShape=function(a,b,
e,c,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+c/8,e+d);a.lineTo(b+7*c/8,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",u);mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,b,e,c,d){a.translate(b,e);a.begin();a.moveTo(c,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(c,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",K);mxUtils.extend(B,mxShape);B.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
a.height/8,a.width,7*a.height/8)};B.prototype.paintBackground=function(a,b,e,c,d){a.translate(b,e);a.begin();a.moveTo(3*c/8,d/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,d/8,c,7*d/8);a.fillAndStroke()};B.prototype.paintForeground=function(a,b,e,c,d){a.begin();a.moveTo(3*c/8,d/8*1.1);a.lineTo(5*c/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",B);mxUtils.extend(L,mxRectangleShape);L.prototype.size=40;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.getLabelBounds=
function(a){var b=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,b)};L.prototype.paintBackground=function(a,b,e,c,d){var f=Math.max(0,Math.min(d,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,b,e,c,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=L&&(g=new g,
g.apply(this.state),a.save(),g.paintVertexShape(a,b,e,c,f),a.restore()));f<d&&(a.setDashed(!0),a.begin(),a.moveTo(b+c/2,e+f),a.lineTo(b+c/2,e+d),a.end(),a.stroke())};L.prototype.paintForeground=function(a,b,e,c,d){var f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,e,c,Math.min(d,f))};mxCellRenderer.registerShape("umlLifeline",L);mxUtils.extend(O,mxShape);O.prototype.width=60;O.prototype.height=30;O.prototype.corner=
-10;O.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))};O.prototype.paintBackground=function(a,b,e,c,d){var f=this.corner,g=Math.min(c,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(d,Math.max(1.5*f,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(b,e,c,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,b,e,c,d),a.setGradient(this.fill,this.gradient,b,e,c,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,e);a.lineTo(b+g,e);a.lineTo(b+g,e+Math.max(0,l-1.5*f));a.lineTo(b+Math.max(0,g-f),e+l);a.lineTo(b,e+l);a.close();a.fillAndStroke();a.begin();
+10;O.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))};O.prototype.paintBackground=function(a,b,e,c,d){var f=this.corner,g=Math.min(c,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(d,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,
+mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(b,e,c,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,b,e,c,d),a.setGradient(this.fill,this.gradient,b,e,c,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,e);a.lineTo(b+g,e);a.lineTo(b+g,e+Math.max(0,l-1.5*f));a.lineTo(b+Math.max(0,g-f),e+l);a.lineTo(b,e+l);a.close();a.fillAndStroke();a.begin();
a.moveTo(b+g,e);a.lineTo(b+c,e);a.lineTo(b+c,e+d);a.lineTo(b,e+d);a.lineTo(b,e+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",O);mxPerimeter.LifelinePerimeter=function(a,b,e,c){c=L.prototype.size;null!=b&&(c=mxUtils.getValue(b.style,"size",c)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;e.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+c,e.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);
mxPerimeter.OrthogonalPerimeter=function(a,b,e,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,e,c){c=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(c+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return e.x<
-a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,e.y)));e.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,e.x)),a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,e,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",A.prototype.size))*
-b.view.scale))),b.style),b,e,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,e,c){var d=m.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d));var f=a.x,g=a.y,l=a.width,p=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+
-l,g+d),new mxPoint(f+l,g+p),new mxPoint(f,g+p-d),new mxPoint(f,g)]):(d=l*Math.max(0,Math.min(1,d)),g=[new mxPoint(f+d,g),new mxPoint(f+l,g),new mxPoint(f+l-d,g+p),new mxPoint(f,g+p),new mxPoint(f+d,g)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(e.x<f||e.x>f+l?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(g,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,e,c){var d=l.prototype.size;null!=b&&(d=
-mxUtils.getValue(b.style,"size",d));var f=a.x,g=a.y,m=a.width,p=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(d=m*Math.max(0,Math.min(1,d)),g=[new mxPoint(f+d,g),new mxPoint(f+m-d,g),new mxPoint(f+m,g+p),new mxPoint(f,g+p),new mxPoint(f+d,g)]):b==mxConstants.DIRECTION_WEST?(d=m*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+m,g),new mxPoint(f+m-d,g+p),new mxPoint(f+d,g+p),new mxPoint(f,
-g)]):b==mxConstants.DIRECTION_NORTH?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g+d),new mxPoint(f+m,g),new mxPoint(f+m,g+p),new mxPoint(f,g+p-d),new mxPoint(f,g+d)]):(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+m,g+d),new mxPoint(f+m,g+p-d),new mxPoint(f,g+p),new mxPoint(f,g)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(e.x<f||e.x>f+m?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(g,a,e)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);
-mxPerimeter.StepPerimeter=function(a,b,e,c){var d="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=d?C.prototype.fixedSize:C.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));d&&(f*=b.view.scale);var g=a.x,l=a.y,m=a.width,p=a.height,u=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,
-l),new mxPoint(g+m-d,l),new mxPoint(g+m,a),new mxPoint(g+m-d,l+p),new mxPoint(g,l+p),new mxPoint(g+d,a),new mxPoint(g,l)]):b==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),l=[new mxPoint(g+d,l),new mxPoint(g+m,l),new mxPoint(g+m-d,a),new mxPoint(g+m,l+p),new mxPoint(g+d,l+p),new mxPoint(g,a),new mxPoint(g+d,l)]):b==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(p,f)):p*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,l+d),new mxPoint(u,l),new mxPoint(g+m,l+
-d),new mxPoint(g+m,l+p),new mxPoint(u,l+p-d),new mxPoint(g,l+p),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(p,f)):p*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,l),new mxPoint(u,l+d),new mxPoint(g+m,l),new mxPoint(g+m,l+p-d),new mxPoint(u,l+p),new mxPoint(g,l+p-d),new mxPoint(g,l)]);u=new mxPoint(u,a);c&&(e.x<g||e.x>g+m?u.y=e.y:u.x=e.x);return mxUtils.getPerimeterPoint(l,u,e)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,e,c){var d=
-"0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=d?z.prototype.fixedSize:z.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));var g=a.x,l=a.y,m=a.width,p=a.height,u=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(p,f)):p*Math.max(0,Math.min(1,f)),l=[new mxPoint(u,l),new mxPoint(g+m,l+d),new mxPoint(g+
-m,l+p-d),new mxPoint(u,l+p),new mxPoint(g,l+p-d),new mxPoint(g,l+d),new mxPoint(u,l)]):(d=d?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),l=[new mxPoint(g+d,l),new mxPoint(g+m-d,l),new mxPoint(g+m,a),new mxPoint(g+m-d,l+p),new mxPoint(g+d,l+p),new mxPoint(g,a),new mxPoint(g+d,l)]);u=new mxPoint(u,a);c&&(e.x<g||e.x>g+m?u.y=e.y:u.x=e.x);return mxUtils.getPerimeterPoint(l,u,e)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(H,mxShape);H.prototype.size=
+a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,e.y)));e.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,e.x)),a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,e,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",z.prototype.size))*
+b.view.scale))),b.style),b,e,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,e,c){var d=n.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d));var f=a.x,g=a.y,l=a.width,u=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(d=u*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+
+l,g+d),new mxPoint(f+l,g+u),new mxPoint(f,g+u-d),new mxPoint(f,g)]):(d=l*Math.max(0,Math.min(1,d)),g=[new mxPoint(f+d,g),new mxPoint(f+l,g),new mxPoint(f+l-d,g+u),new mxPoint(f,g+u),new mxPoint(f+d,g)]);u=a.getCenterX();a=a.getCenterY();a=new mxPoint(u,a);c&&(e.x<f||e.x>f+l?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(g,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,e,c){var d=l.prototype.size;null!=b&&(d=
+mxUtils.getValue(b.style,"size",d));var f=a.x,g=a.y,n=a.width,u=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(f+d,g),new mxPoint(f+n-d,g),new mxPoint(f+n,g+u),new mxPoint(f,g+u),new mxPoint(f+d,g)]):b==mxConstants.DIRECTION_WEST?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+n,g),new mxPoint(f+n-d,g+u),new mxPoint(f+d,g+u),new mxPoint(f,
+g)]):b==mxConstants.DIRECTION_NORTH?(d=u*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g+d),new mxPoint(f+n,g),new mxPoint(f+n,g+u),new mxPoint(f,g+u-d),new mxPoint(f,g+d)]):(d=u*Math.max(0,Math.min(1,d)),g=[new mxPoint(f,g),new mxPoint(f+n,g+d),new mxPoint(f+n,g+u-d),new mxPoint(f,g+u),new mxPoint(f,g)]);u=a.getCenterX();a=a.getCenterY();a=new mxPoint(u,a);c&&(e.x<f||e.x>f+n?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(g,a,e)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);
+mxPerimeter.StepPerimeter=function(a,b,e,c){var d="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=d?C.prototype.fixedSize:C.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));d&&(f*=b.view.scale);var g=a.x,l=a.y,n=a.width,u=a.height,p=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(n,f)):n*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,
+l),new mxPoint(g+n-d,l),new mxPoint(g+n,a),new mxPoint(g+n-d,l+u),new mxPoint(g,l+u),new mxPoint(g+d,a),new mxPoint(g,l)]):b==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(n,f)):n*Math.max(0,Math.min(1,f)),l=[new mxPoint(g+d,l),new mxPoint(g+n,l),new mxPoint(g+n-d,a),new mxPoint(g+n,l+u),new mxPoint(g+d,l+u),new mxPoint(g,a),new mxPoint(g+d,l)]):b==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(u,f)):u*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,l+d),new mxPoint(p,l),new mxPoint(g+n,l+
+d),new mxPoint(g+n,l+u),new mxPoint(p,l+u-d),new mxPoint(g,l+u),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(u,f)):u*Math.max(0,Math.min(1,f)),l=[new mxPoint(g,l),new mxPoint(p,l+d),new mxPoint(g+n,l),new mxPoint(g+n,l+u-d),new mxPoint(p,l+u),new mxPoint(g,l+u-d),new mxPoint(g,l)]);p=new mxPoint(p,a);c&&(e.x<g||e.x>g+n?p.y=e.y:p.x=e.x);return mxUtils.getPerimeterPoint(l,p,e)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,e,c){var d=
+"0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=d?A.prototype.fixedSize:A.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));var g=a.x,l=a.y,n=a.width,u=a.height,p=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(u,f)):u*Math.max(0,Math.min(1,f)),l=[new mxPoint(p,l),new mxPoint(g+n,l+d),new mxPoint(g+
+n,l+u-d),new mxPoint(p,l+u),new mxPoint(g,l+u-d),new mxPoint(g,l+d),new mxPoint(p,l)]):(d=d?Math.max(0,Math.min(n,f)):n*Math.max(0,Math.min(1,f)),l=[new mxPoint(g+d,l),new mxPoint(g+n-d,l),new mxPoint(g+n,a),new mxPoint(g+n-d,l+u),new mxPoint(g+d,l+u),new mxPoint(g,a),new mxPoint(g+d,l)]);p=new mxPoint(p,a);c&&(e.x<g||e.x>g+n?p.y=e.y:p.x=e.x);return mxUtils.getPerimeterPoint(l,p,e)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(H,mxShape);H.prototype.size=
10;H.prototype.paintBackground=function(a,b,e,c,d){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,e);a.ellipse((c-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(c/2,f);a.lineTo(c/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",H);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.inset=2;S.prototype.paintBackground=function(a,b,e,c,d){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",
this.inset))+this.strokewidth;a.translate(b,e);a.begin();a.moveTo(c/2,f+g);a.lineTo(c/2,d);a.end();a.stroke();a.begin();a.moveTo((c-f)/2-g,f/2);a.quadTo((c-f)/2-g,f+g,c/2,f+g);a.quadTo((c+f)/2+g,f+g,(c+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",S);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(a,b,e,c,d){a.translate(b,e);a.begin();a.moveTo(0,0);a.quadTo(c,0,c,d/2);a.quadTo(c,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",
-fa);mxUtils.extend(ga,mxShape);ga.prototype.inset=2;ga.prototype.paintBackground=function(a,b,e,c,d){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,e);a.ellipse(0,f,c-2*f,d-2*f);a.fillAndStroke();a.begin();a.moveTo(c/2,0);a.quadTo(c,0,c,d/2);a.quadTo(c,d,c/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ga);mxUtils.extend(ba,mxCylinder);ba.prototype.jettyWidth=20;ba.prototype.jettyHeight=10;ba.prototype.redrawPath=
-function(a,b,e,c,d,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=g/2;var g=e+g/2,l=Math.min(b,d-b),m=Math.min(l+2*b,d-b);f?(a.moveTo(e,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(e,l+b),a.moveTo(e,m),a.lineTo(g,m),a.lineTo(g,m+b),a.lineTo(e,m+b)):(a.moveTo(e,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(e,d),a.lineTo(e,m+b),a.lineTo(0,m+b),a.lineTo(0,m),a.lineTo(e,m),a.lineTo(e,l+b),a.lineTo(0,l+b),
-a.lineTo(0,l),a.lineTo(e,l),a.close());a.end()};mxCellRenderer.registerShape("module",ba);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.prototype.redrawPath=function(a,b,e,c,d,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=g/2;var g=e+g/2,l=.3*d-b/2,m=.7*d-b/2;f?(a.moveTo(e,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(e,l+b),a.moveTo(e,m),a.lineTo(g,m),a.lineTo(g,
-m+b),a.lineTo(e,m+b)):(a.moveTo(e,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(e,d),a.lineTo(e,m+b),a.lineTo(0,m+b),a.lineTo(0,m),a.lineTo(e,m),a.lineTo(e,l+b),a.lineTo(0,l+b),a.lineTo(0,l),a.lineTo(e,l),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(X,mxRectangleShape);X.prototype.paintForeground=function(a,b,e,c,d){var f=c/2,g=d/2,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,e),new mxPoint(b+
-c,e+g),new mxPoint(b+f,e+d),new mxPoint(b,e+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",X);mxUtils.extend(ca,mxDoubleEllipse);ca.prototype.outerStroke=!0;ca.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.min(4,Math.min(c/5,d/5));0<c&&0<d&&(a.ellipse(b+f,e+f,c-2*f,d-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,e,c,d),a.stroke())};mxCellRenderer.registerShape("endState",
-ca);mxUtils.extend(ha,ca);ha.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ha);mxUtils.extend(ea,mxArrowConnector);ea.prototype.defaultWidth=4;ea.prototype.isOpenEnded=function(){return!0};ea.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ea.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ea);mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=
+fa);mxUtils.extend(ga,mxShape);ga.prototype.inset=2;ga.prototype.paintBackground=function(a,b,e,c,d){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,e);a.ellipse(0,f,c-2*f,d-2*f);a.fillAndStroke();a.begin();a.moveTo(c/2,0);a.quadTo(c,0,c,d/2);a.quadTo(c,d,c/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ga);mxUtils.extend(aa,mxCylinder);aa.prototype.jettyWidth=20;aa.prototype.jettyHeight=10;aa.prototype.redrawPath=
+function(a,b,e,c,d,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=g/2;var g=e+g/2,l=Math.min(b,d-b),n=Math.min(l+2*b,d-b);f?(a.moveTo(e,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(e,l+b),a.moveTo(e,n),a.lineTo(g,n),a.lineTo(g,n+b),a.lineTo(e,n+b)):(a.moveTo(e,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(e,d),a.lineTo(e,n+b),a.lineTo(0,n+b),a.lineTo(0,n),a.lineTo(e,n),a.lineTo(e,l+b),a.lineTo(0,l+b),
+a.lineTo(0,l),a.lineTo(e,l),a.close());a.end()};mxCellRenderer.registerShape("module",aa);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.prototype.redrawPath=function(a,b,e,c,d,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=g/2;var g=e+g/2,l=.3*d-b/2,n=.7*d-b/2;f?(a.moveTo(e,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(e,l+b),a.moveTo(e,n),a.lineTo(g,n),a.lineTo(g,
+n+b),a.lineTo(e,n+b)):(a.moveTo(e,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(e,d),a.lineTo(e,n+b),a.lineTo(0,n+b),a.lineTo(0,n),a.lineTo(e,n),a.lineTo(e,l+b),a.lineTo(0,l+b),a.lineTo(0,l),a.lineTo(e,l),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(X,mxRectangleShape);X.prototype.paintForeground=function(a,b,e,c,d){var f=c/2,g=d/2,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,e),new mxPoint(b+
+c,e+g),new mxPoint(b+f,e+d),new mxPoint(b,e+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",X);mxUtils.extend(ba,mxDoubleEllipse);ba.prototype.outerStroke=!0;ba.prototype.paintVertexShape=function(a,b,e,c,d){var f=Math.min(4,Math.min(c/5,d/5));0<c&&0<d&&(a.ellipse(b+f,e+f,c-2*f,d-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,e,c,d),a.stroke())};mxCellRenderer.registerShape("endState",
+ba);mxUtils.extend(ha,ba);ha.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ha);mxUtils.extend(ea,mxArrowConnector);ea.prototype.defaultWidth=4;ea.prototype.isOpenEnded=function(){return!0};ea.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ea.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ea);mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=
10;U.prototype.defaultArrowWidth=20;U.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};U.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",U);mxUtils.extend(da,mxActor);
da.prototype.size=30;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(a,b,e,c,d){b=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,b),new mxPoint(c,0),new mxPoint(c,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("manualInput",da);mxUtils.extend(Q,mxRectangleShape);Q.prototype.dx=20;Q.prototype.dy=20;
Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.paintForeground=function(a,b,e,c,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*g,d*g));g=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,
@@ -2811,56 +2811,56 @@ c/2,e+d)):(a.moveTo(b,e+d/2),a.lineTo(b+c,e+d/2));a.end();a.stroke()};mxCellRend
"size",this.size))));b=(d-f)/2;e=b+f;var g=(c-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(c,b);a.lineTo(c,e);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(g,d);a.lineTo(g,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(ma,mxActor);ma.prototype.size=.25;ma.prototype.redrawPath=function(a,b,e,c,d){b=Math.min(c,d/2);e=Math.min(c-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.moveTo(0,d/2);a.lineTo(e,
0);a.lineTo(c-b,0);a.quadTo(c,0,c,d/2);a.quadTo(c,d,c-b,d);a.lineTo(e,d);a.close();a.end()};mxCellRenderer.registerShape("display",ma);mxUtils.extend(ta,mxConnector);ta.prototype.origPaintEdgeShape=ta.prototype.paintEdgeShape;ta.prototype.paintEdgeShape=function(a,b,e){for(var c=[],d=0;d<b.length;d++)c.push(mxUtils.clone(b[d]));var d=a.state.dashed,f=a.state.fixDash;ta.prototype.origPaintEdgeShape.apply(this,[a,c,e]);3<=a.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&
(a.setStrokeColor(c),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,f),ta.prototype.origPaintEdgeShape.apply(this,[a,b,e])))};mxCellRenderer.registerShape("filledEdge",ta);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),e=a.apply(this,arguments);"umlFrame"==b.style.shape&&e.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});
-return e}}();mxMarker.addMarker("dash",function(a,b,e,c,d,f,g,l,m,p){var u=d*(g+m+1),t=f*(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("box",function(a,b,e,c,d,f,g,l,m,p){var u=d*(g+m+1),t=f*(g+m+1),B=c.x+u/2,k=c.y+t/2;c.x-=u;c.y-=t;return function(){a.begin();a.moveTo(B-u/2-t/2,k-t/2+u/2);a.lineTo(B-u/2+t/2,k-t/2-u/2);a.lineTo(B+t/2-3*u/2,k-3*t/2-u/2);a.lineTo(B-t/2-3*u/2,k-3*t/2+u/2);a.close();p?a.fillAndStroke():
-a.stroke()}});mxMarker.addMarker("cross",function(a,b,e,c,d,f,g,l,m,p){var u=d*(g+m+1),t=f*(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",Ba);mxMarker.addMarker("circlePlus",function(a,b,e,c,d,f,g,l,m,p){var u=c.clone(),t=Ba.apply(this,arguments),B=d*(g+2*m),k=f*(g+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(u.x-
-d*m,u.y-f*m);a.lineTo(u.x-2*B+d*m,u.y-2*k+f*m);a.moveTo(u.x-B-k+f*m,u.y-k+B-d*m);a.lineTo(u.x+k-B-f*m,u.y-k-B+d*m);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,e,c,d,f,g,l,m,p){var u=d*(g+m+1),t=f*(g+m+1),B=c.clone();c.x-=u;c.y-=t;return function(){a.begin();a.moveTo(B.x-t,B.y+u);a.quadTo(c.x-t,c.y+u,c.x,c.y);a.quadTo(c.x+t,c.y-u,B.x+t,B.y-u);a.stroke()}});mxMarker.addMarker("async",function(a,b,e,c,d,f,g,l,m,p){b=d*m*1.118;e=f*m*1.118;d*=g+m;f*=g+m;var u=c.clone();u.x-=b;u.y-=e;c.x+=
-1*-d-b;c.y+=1*-f-e;return function(){a.begin();a.moveTo(u.x,u.y);l?a.lineTo(u.x-d-f/2,u.y-f+d/2):a.lineTo(u.x+f/2-d,u.y-f-d/2);a.lineTo(u.x-d,u.y-f);a.close();p?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,e,c,d,f,g,l,m,p,u){f*=l+p;g*=l+p;var t=d.clone();return function(){b.begin();b.moveTo(t.x,t.y);m?b.lineTo(t.x-f-g/a,t.y-g+f/a):b.lineTo(t.x+g/a-f,t.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Oa=function(a,
-b,e){return Da(a,["width"],b,function(b,c,d,f,g){g=a.shape.getEdgeWidth()*a.view.scale+e;return new mxPoint(f.x+c*b/4+d*g/2,f.y+d*b/4-c*g/2)},function(b,c,d,f,g,l){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*b)/a.view.scale-e})},Da=function(a,b,e,c,d){return V(a,b,function(b){var d=a.absolutePoints,f=d.length-1;b=a.view.translate;var g=a.view.scale,l=e?d[0]:d[f],d=e?d[1]:d[f-1],f=d.x-l.x,m=d.y-l.y,p=Math.sqrt(f*f+m*m),l=c.call(this,p,f/p,m/p,l,d);return new mxPoint(l.x/
-g-b.x,l.y/g-b.y)},function(b,c,f){var g=a.absolutePoints,l=g.length-1;b=a.view.translate;var m=a.view.scale,p=e?g[0]:g[l],g=e?g[1]:g[l-1],l=g.x-p.x,u=g.y-p.y,t=Math.sqrt(l*l+u*u);c.x=(c.x+b.x)*m;c.y=(c.y+b.y)*m;d.call(this,t,l/t,u/t,p,g,c,f)})},za=function(a){return function(b){return[V(b,["arrowWidth","arrowSize"],function(b){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",T.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));
+return e}}();mxMarker.addMarker("dash",function(a,b,e,c,d,f,g,l,n,u){var p=d*(g+n+1),t=f*(g+n+1);return function(){a.begin();a.moveTo(c.x-p/2-t/2,c.y-t/2+p/2);a.lineTo(c.x+t/2-3*p/2,c.y-3*t/2-p/2);a.stroke()}});mxMarker.addMarker("box",function(a,b,e,c,d,f,g,l,n,u){var p=d*(g+n+1),t=f*(g+n+1),B=c.x+p/2,k=c.y+t/2;c.x-=p;c.y-=t;return function(){a.begin();a.moveTo(B-p/2-t/2,k-t/2+p/2);a.lineTo(B-p/2+t/2,k-t/2-p/2);a.lineTo(B+t/2-3*p/2,k-3*t/2-p/2);a.lineTo(B-t/2-3*p/2,k-3*t/2+p/2);a.close();u?a.fillAndStroke():
+a.stroke()}});mxMarker.addMarker("cross",function(a,b,e,c,d,f,g,l,n,u){var p=d*(g+n+1),t=f*(g+n+1);return function(){a.begin();a.moveTo(c.x-p/2-t/2,c.y-t/2+p/2);a.lineTo(c.x+t/2-3*p/2,c.y-3*t/2-p/2);a.moveTo(c.x-p/2+t/2,c.y-t/2-p/2);a.lineTo(c.x-t/2-3*p/2,c.y-3*t/2+p/2);a.stroke()}});mxMarker.addMarker("circle",Ba);mxMarker.addMarker("circlePlus",function(a,b,e,c,d,f,g,l,n,u){var p=c.clone(),t=Ba.apply(this,arguments),B=d*(g+2*n),k=f*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(p.x-
+d*n,p.y-f*n);a.lineTo(p.x-2*B+d*n,p.y-2*k+f*n);a.moveTo(p.x-B-k+f*n,p.y-k+B-d*n);a.lineTo(p.x+k-B-f*n,p.y-k-B+d*n);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,e,c,d,f,g,l,n,u){var p=d*(g+n+1),t=f*(g+n+1),B=c.clone();c.x-=p;c.y-=t;return function(){a.begin();a.moveTo(B.x-t,B.y+p);a.quadTo(c.x-t,c.y+p,c.x,c.y);a.quadTo(c.x+t,c.y-p,B.x+t,B.y-p);a.stroke()}});mxMarker.addMarker("async",function(a,b,e,c,d,f,g,l,n,u){b=d*n*1.118;e=f*n*1.118;d*=g+n;f*=g+n;var p=c.clone();p.x-=b;p.y-=e;c.x+=
+1*-d-b;c.y+=1*-f-e;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-d-f/2,p.y-f+d/2):a.lineTo(p.x+f/2-d,p.y-f-d/2);a.lineTo(p.x-d,p.y-f);a.close();u?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,e,c,d,f,g,l,n,u,p){f*=l+u;g*=l+u;var t=d.clone();return function(){b.begin();b.moveTo(t.x,t.y);n?b.lineTo(t.x-f-g/a,t.y-g+f/a):b.lineTo(t.x+g/a-f,t.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Oa=function(a,
+b,e){return Da(a,["width"],b,function(b,c,d,f,g){g=a.shape.getEdgeWidth()*a.view.scale+e;return new mxPoint(f.x+c*b/4+d*g/2,f.y+d*b/4-c*g/2)},function(b,c,d,f,g,l){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*b)/a.view.scale-e})},Da=function(a,b,e,c,d){return V(a,b,function(b){var d=a.absolutePoints,f=d.length-1;b=a.view.translate;var g=a.view.scale,l=e?d[0]:d[f],d=e?d[1]:d[f-1],f=d.x-l.x,n=d.y-l.y,u=Math.sqrt(f*f+n*n),l=c.call(this,u,f/u,n/u,l,d);return new mxPoint(l.x/
+g-b.x,l.y/g-b.y)},function(b,c,f){var g=a.absolutePoints,l=g.length-1;b=a.view.translate;var n=a.view.scale,u=e?g[0]:g[l],g=e?g[1]:g[l-1],l=g.x-u.x,p=g.y-u.y,t=Math.sqrt(l*l+p*p);c.x=(c.x+b.x)*n;c.y=(c.y+b.y)*n;d.call(this,t,l/t,p/t,u,g,c,f)})},za=function(a){return function(b){return[V(b,["arrowWidth","arrowSize"],function(b){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",T.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));
return new mxPoint(b.x+(1-c)*b.width,b.y+(1-e)*b.height/2)},function(b,e){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-e.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-e.x)/b.width))})]}},Ka=function(a,b,e){return function(c){var d=[V(c,["size"],function(e){var c=Math.max(0,Math.min(e.width,Math.min(e.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(e.x+c,e.y+c)},function(b,e){this.state.style.size=Math.round(Math.max(0,
Math.min(Math.min(b.width,e.x-b.x),Math.min(b.height,e.y-b.y)))/a)},!1)];e&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(va(c));return d}},Ea=function(a,b,e,c,d){e=null!=e?e:1;return function(f){var g=[V(f,["size"],function(b){var e=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",e?d:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,c*(e?1:b.width))),b.getCenterY())},function(a,b,c){a=null!=d&&"0"!=mxUtils.getValue(this.state.style,
"fixedSize","0")?b.x-a.x:Math.max(0,Math.min(e,(b.x-a.x)/a.width));this.state.style.size=a},!1,c)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(va(f));return g}},Ma=function(a){return function(b){var e=[V(b,["size"],function(b){var e=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(b.x+e*b.width*.75,b.y+b.height/4)},function(b,e){this.state.style.size=Math.max(0,Math.min(a,(e.x-b.x)/(.75*b.width)))},!1,!0)];mxUtils.getValue(b.style,
mxConstants.STYLE_ROUNDED,!1)&&e.push(va(b));return e}},Ca=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b}},va=function(a,b){return V(a,[mxConstants.STYLE_ARCSIZE],function(e){var c=null!=b?b:e.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(e.x+e.width-Math.min(e.width/2,d),e.y+c)}d=Math.max(0,
parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(e.x+e.width-Math.min(Math.max(e.width/2,e.height/2),Math.min(e.width,e.height)*d),e.y+c)},function(b,e,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-e.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-
-e.x+b.x)/Math.min(b.width,b.height))))})},V=function(a,b,e,c,d,f,g){var l=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);l.execute=function(a){for(var e=0;e<b.length;e++)this.copyStyle(b[e]);g&&g(a)};l.getPosition=e;l.setPosition=c;l.ignoreGrid=null!=d?d:!0;if(f){var m=l.positionChanged;l.positionChanged=function(){m.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return l},Fa={link:function(a){return[Oa(a,!0,10),Oa(a,!1,10)]},flexArrow:function(a){var b=
+e.x+b.x)/Math.min(b.width,b.height))))})},V=function(a,b,e,c,d,f,g){var l=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);l.execute=function(a){for(var e=0;e<b.length;e++)this.copyStyle(b[e]);g&&g(a)};l.getPosition=e;l.setPosition=c;l.ignoreGrid=null!=d?d:!0;if(f){var n=l.positionChanged;l.positionChanged=function(){n.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return l},Fa={link:function(a){return[Oa(a,!0,10),Oa(a,!1,10)]},flexArrow:function(a){var b=
a.view.graph.gridSize/a.view.scale,e=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Da(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,e,c,d,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)+c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)-e*
-b/2)},function(e,c,d,f,g,l,m){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/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]))<
-b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),e.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,e,c,d,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)+c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)-e*b/2)},function(e,c,d,f,g,l,m){e=
-Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
+b/2)},function(e,c,d,f,g,l,n){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<
+b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),e.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,e,c,d,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)+c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)-e*b/2)},function(e,c,d,f,g,l,n){e=
+Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Da(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,e,c,d,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,
-mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)-c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)+e*b/2)},function(e,c,d,f,g,l,m){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/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]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),e.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,e,c,d,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)-c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)+e*b/2)},function(e,c,d,f,g,l,m){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*e)-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]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return e},swimlane:function(a){var b=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var e=
+mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)-c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)+e*b/2)},function(e,c,d,f,g,l,n){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=
+a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),e.push(Da(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,e,c,d,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
+5)*a.view.scale;return new mxPoint(d.x+e*(f+a.shape.strokewidth*a.view.scale)-c*b/2,d.y+c*(f+a.shape.strokewidth*a.view.scale)+e*b/2)},function(e,c,d,f,g,l,n){e=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+d,f.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=
+a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return e},swimlane:function(a){var b=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var e=
parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(va(a,e/2))}b.push(V(a,[mxConstants.STYLE_STARTSIZE],function(b){var e=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,e))):new mxPoint(b.x+Math.max(0,Math.min(b.width,e)),b.getCenterY())},function(b,e){a.style[mxConstants.STYLE_STARTSIZE]=
1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,e.y-b.y))):Math.round(Math.max(0,Math.min(b.width,e.x-b.x)))},!1,null,function(b){if(mxEvent.isControlDown(b.getEvent())&&(b=a.view.graph,b.isTableRow(a.cell)||b.isTableCell(a.cell))){for(var e=b.getSwimlaneDirection(a.style),c=b.model.getParent(a.cell),c=b.model.getChildCells(c,!0),d=[],f=0;f<c.length;f++)c[f]!=a.cell&&b.isSwimlane(c[f])&&b.getSwimlaneDirection(b.getCurrentCellStyle(c[f]))==
e&&d.push(c[f]);b.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return b},label:Ca(),ext:Ca(),rectangle:Ca(),triangle:Ca(),rhombus:Ca(),umlLifeline:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[V(a,
["width","height"],function(a){var b=Math.max(O.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",O.prototype.width))),e=Math.max(1.5*O.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",O.prototype.height)));return new mxPoint(a.x+b,a.y+e)},function(a,b){this.state.style.width=Math.round(Math.max(O.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*O.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},
-process:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},cross:function(a){return[V(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",ya.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var e=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/e*2,Math.max(0,a.getCenterX()-b.x)/e*2)))})]},note:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=
+process:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},cross:function(a){return[V(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",ya.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var e=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/e*2,Math.max(0,a.getCenterX()-b.x)/e*2)))})]},note:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=
Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",da.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},dataStorage:function(a){return[V(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",sa.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))},!1)]},callout:function(a){var b=[V(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));
-mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(a.x+e*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),V(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+
-b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),V(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",A.prototype.base)));return new mxPoint(a.x+Math.min(a.width,e*a.width+c),a.y+a.height-
-b)},function(a,b){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-e*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},internalStorage:function(a){var b=[V(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",Q.prototype.dy)));return new mxPoint(a.x+b,a.y+e)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},module:function(a){return[V(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",ba.prototype.jettyWidth))),e=Math.max(0,Math.min(a.height,
-mxUtils.getValue(this.state.style,"jettyHeight",ba.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*e)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[V(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",sa.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))},!1)]},callout:function(a){var b=[V(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));
+mxUtils.getValue(this.state.style,"base",z.prototype.base);return new mxPoint(a.x+e*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",z.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),V(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",z.prototype.position2)));return new mxPoint(a.x+
+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),V(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",z.prototype.base)));return new mxPoint(a.x+Math.min(a.width,e*a.width+c),a.y+a.height-
+b)},function(a,b){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-e*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},internalStorage:function(a){var b=[V(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"dy",Q.prototype.dy)));return new mxPoint(a.x+b,a.y+e)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},module:function(a){return[V(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",aa.prototype.jettyWidth))),e=Math.max(0,Math.min(a.height,
+mxUtils.getValue(this.state.style,"jettyHeight",aa.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*e)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[V(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
"dy",M.prototype.dy)));return new mxPoint(a.x+b,a.y+e)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},tee:function(a){return[V(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",P.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+e)},function(a,
b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},singleArrow:za(1),doubleArrow:za(.5),folder:function(a){return[V(a,["tabWidth","tabHeight"],function(a){var e=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",b.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",b.prototype.tabHeight)));mxUtils.getValue(this.state.style,
"tabPosition",b.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(e=a.width-e);return new mxPoint(a.x+e,a.y+c)},function(a,e){var c=Math.max(0,Math.min(a.width,e.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",b.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,e.y-a.y)))},!1)]},document:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
"size",p.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},tape:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))},!1)]},offPageConnector:function(a){return[V(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},step:Ea(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ea(z.prototype.size,!0,.5,!0,z.prototype.fixedSize),curlyBracket:Ea(v.prototype.size,!1),display:Ea(ma.prototype.size,!1),cube:Ka(1,c.prototype.size,!1),card:Ka(.5,
+["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},step:Ea(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ea(A.prototype.size,!0,.5,!0,A.prototype.fixedSize),curlyBracket:Ea(x.prototype.size,!1),display:Ea(ma.prototype.size,!1),cube:Ka(1,c.prototype.size,!1),card:Ka(.5,
e.prototype.size,!0),loopLimit:Ka(.5,W.prototype.size,!0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=V;Graph.handleFactory=Fa;var Ta=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Ta.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)?b=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
(b=mxConstants.SHAPE_SWIMLANE);b=Fa[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&(b=Fa[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Fa[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
{};var Ga=new mxPoint(1,0),Ha=new mxPoint(1,0),za=mxUtils.toRadians(-30),Ga=mxUtils.getRotatedPoint(Ga,Math.cos(za),Math.sin(za)),za=mxUtils.toRadians(-150),Ha=mxUtils.getRotatedPoint(Ha,Math.cos(za),Math.sin(za));mxEdgeStyle.IsometricConnector=function(a,b,e,c,d){var f=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=c&&(c=f.transformControlPoint(a,c));null==l&&null!=b&&(l=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=e&&(g=new mxPoint(e.getCenterX(),
-e.getCenterY()));var m=Ga.x,p=Ga.y,u=Ha.x,t=Ha.y,B="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,b,e){a-=k.x;var c=b-k.y;b=(t*a-u*c)/(m*t-p*u);a=(p*a-m*c)/(p*u-m*t);B?(e&&(k=new mxPoint(k.x+m*b,k.y+p*b),d.push(k)),k=new mxPoint(k.x+u*a,k.y+t*a)):(e&&(k=new mxPoint(k.x+u*a,k.y+t*a),d.push(k)),k=new mxPoint(k.x+m*b,k.y+p*b));d.push(k)};var k=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
+e.getCenterY()));var n=Ga.x,u=Ga.y,p=Ha.x,t=Ha.y,B="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,b,e){a-=k.x;var c=b-k.y;b=(t*a-p*c)/(n*t-u*p);a=(u*a-n*c)/(u*p-n*t);B?(e&&(k=new mxPoint(k.x+n*b,k.y+u*b),d.push(k)),k=new mxPoint(k.x+p*a,k.y+t*a)):(e&&(k=new mxPoint(k.x+p*a,k.y+t*a),d.push(k)),k=new mxPoint(k.x+n*b,k.y+u*b));d.push(k)};var k=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
mxEdgeStyle.IsometricConnector);var Ua=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var e=new mxElbowEdgeHandler(a);e.snapToTerminals=!1;return e}return Ua.apply(this,arguments)};f.prototype.constraints=[];d.prototype.getConstraints=function(a,b,e){a=[];var c=Math.tan(mxUtils.toRadians(30)),d=(.5-c)/2,c=Math.min(b,e/(.5+c));b=(b-c)/2;e=(e-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,b+.5*c,e+c*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+c,e+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+c,e+.75*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*c,e+(1-d)*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e+.75*c));return a};A.prototype.getConstraints=function(a,b,e){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+0),!1,null,b+.5*c,e+c*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+c,e+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+c,e+.75*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*c,e+(1-d)*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e+.75*c));return a};z.prototype.getConstraints=function(a,b,e){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-c)));b>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),
new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];wa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;E.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.getConstraints=
+0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];wa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;E.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.getConstraints=
function(a,b,e){a=[];var c=Math.max(0,Math.min(b,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,.5*(e+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};e.prototype.getConstraints=function(a,b,e){a=[];var c=Math.max(0,Math.min(b,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e+c)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
@@ -2871,8 +2871,8 @@ function(a,b,e){a=[];var c=Math.max(0,Math.min(b,Math.min(e,parseFloat(mxUtils.g
0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,.5*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};Q.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;
ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;xa.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.getConstraints=function(a,b,e){a=[];var c=Math.min(b,e/2),d=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+b-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+b-c),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));return a};ba.prototype.getConstraints=
-function(a,b,e){b=parseFloat(mxUtils.getValue(a,"jettyWidth",ba.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",ba.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
+.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+b-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+b-c),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));return a};aa.prototype.getConstraints=
+function(a,b,e){b=parseFloat(mxUtils.getValue(a,"jettyWidth",aa.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",aa.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(e-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(e-.5*a,3.5*a))];e>5*a&&c.push(new mxConnectionConstraint(new mxPoint(0,
.75),!1,null,b));e>8*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b));e>15*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return c};W.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,
.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.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)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,
@@ -2885,7 +2885,7 @@ function(a,b,e){b=parseFloat(mxUtils.getValue(a,"jettyWidth",ba.prototype.jettyW
[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)];m.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+.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)];n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=mxRectangleShape.prototype.constraints;p.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;P.prototype.getConstraints=function(a,b,e){a=[];var c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
"dx",this.dx)))),d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*c,d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(b+c),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+c),.5*(e+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+c),e));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c),.5*(e+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c),d));a.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2905,8 +2905,8 @@ Actions.prototype.init=function(){function a(a){d.escape();a=d.deleteCells(d.get
"import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,e){try{var b=mxUtils.parseXml(a);f.graph.setSelectionCells(f.graph.importGraphModel(b.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+
"+S").isEnabled=k;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,
300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(b){c.handleError(b)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var c=0;c<b.length&&a;c++)a=a&&d.model.isEdge(b[c]);var f=d.view.translate,m=d.view.scale,l=f.x,k=f.y,f=null;if(1==b.length&&a){var t=d.getCellGeometry(b[0]);
-null!=t&&(f=t.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var n=Math.round(d.snap(d.popupMenuHandler.triggerX/m-l)),x=Math.round(d.snap(d.popupMenuHandler.triggerY/m-k));d.cellsMoved(b,n-f.x,x-f.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var c=0;c<b.length&&a;c++)a=a&&d.model.isEdge(b[c]);var f=d.view.translate,n=d.view.scale,l=f.x,k=f.y,f=null;if(1==b.length&&a){var t=d.getCellGeometry(b[0]);
+null!=t&&(f=t.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var m=Math.round(d.snap(d.popupMenuHandler.triggerX/n-l)),v=Math.round(d.snap(d.popupMenuHandler.triggerY/n-k));d.cellsMoved(b,m-f.x,v-f.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=c.copiedSize){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(a=0;a<b.length;a++)if(d.getModel().isVertex(b[a])){var f=d.getCellGeometry(b[a]);null!=f&&(f=f.clone(),f.width=c.copiedSize.width,f.height=c.copiedSize.height,d.getModel().setGeometry(b[a],f))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(b){c.handleError(b)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a){d.turnShapes(d.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices(null,
!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,
@@ -2917,10 +2917,10 @@ c.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip.
null!=a&&d.openLink(a)});this.addAction("editLink...",function(){var a=c.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var e=a.getSelectionCell(),d=a.getLinkForCell(e)||"";c.showLinkDialog(d,mxResources.get("apply"),function(b){b=mxUtils.trim(b);a.setLinkForCell(e,0<b.length?b:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),c.actions.get("image").funct())})).isEnabled=
k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&c.showLinkDialog("",mxResources.get("insert"),function(a,e){a=mxUtils.trim(a);if(0<a.length){var b=null,c=d.getLinkTitle(a);null!=e&&0<e.length&&(b=e[0].iconUrl,c=e[0].name||e[0].type,c=c.charAt(0).toUpperCase()+c.substring(1),30<c.length&&(c=c.substring(0,30)+"..."));b=new mxCell(c,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=
b?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+b:"spacing=10;"));b.vertex=!0;c=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([b],!0));b.geometry.x=c.x;b.geometry.y=c.y;d.setLinkForCell(b,a);d.cellSizeUpdated(b,!0);d.getModel().beginUpdate();try{b=d.addCell(b),d.fireEvent(new mxEventObject("cellsInserted","cells",[b]))}finally{d.getModel().endUpdate()}d.setSelectionCell(b);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,
-function(){var a=c.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var e=a.getSelectedElement(),d=a.getParentByName(e,"A",a.cellEditor.textarea),f="";if(null==d&&null!=e&&null!=e.getElementsByTagName)for(var m=e.getElementsByTagName("a"),l=0;l<m.length&&null==d;l++)m[l].textContent==e.textContent&&(d=m[l]);null!=d&&"A"==d.nodeName&&(f=d.getAttribute("href")||"",a.selectNode(d));var k=a.cellEditor.saveSelection();c.showLinkDialog(f,mxResources.get("apply"),mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(k);
-null!=b&&a.insertLink(b)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var e=0;e<a.length;e++){var c=a[e];if(d.getModel().getChildCount(c))d.updateGroupBounds([c],20);else{var f=d.view.getState(c),m=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=f&&null!=f.text&&null!=m&&d.isWrapping(c)?(m=m.clone(),m.height=f.text.boundingBox.height/
-d.view.scale,d.getModel().setGeometry(c,m)):d.updateCellSize(c)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var e=d.getSelectionCells(),f=0;f<e.length;f++)if(state=d.getView().getState(e[f]),null!=state){var p=mxUtils.getValue(state.style,"html","0");if("1"==p&&null==a){var m=d.convertValueToString(state.cell);
-"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var l=document.createElement("div");l.innerHTML=d.sanitizeHtml(m);m=mxUtils.extractTextWithWhitespace(l.childNodes);d.cellLabelChanged(state.cell,m);d.setCellStyles("html",a,[e[f]])}else"0"==p&&"1"==a&&(m=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(m)),d.setCellStyles("html",
+function(){var a=c.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var e=a.getSelectedElement(),d=a.getParentByName(e,"A",a.cellEditor.textarea),f="";if(null==d&&null!=e&&null!=e.getElementsByTagName)for(var n=e.getElementsByTagName("a"),l=0;l<n.length&&null==d;l++)n[l].textContent==e.textContent&&(d=n[l]);null!=d&&"A"==d.nodeName&&(f=d.getAttribute("href")||"",a.selectNode(d));var k=a.cellEditor.saveSelection();c.showLinkDialog(f,mxResources.get("apply"),mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(k);
+null!=b&&a.insertLink(b)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var e=0;e<a.length;e++){var c=a[e];if(d.getModel().getChildCount(c))d.updateGroupBounds([c],20);else{var f=d.view.getState(c),n=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=f&&null!=f.text&&null!=n&&d.isWrapping(c)?(n=n.clone(),n.height=f.text.boundingBox.height/
+d.view.scale,d.getModel().setGeometry(c,n)):d.updateCellSize(c)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var e=d.getSelectionCells(),f=0;f<e.length;f++)if(state=d.getView().getState(e[f]),null!=state){var p=mxUtils.getValue(state.style,"html","0");if("1"==p&&null==a){var n=d.convertValueToString(state.cell);
+"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(n=n.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var l=document.createElement("div");l.innerHTML=d.sanitizeHtml(n);n=mxUtils.extractTextWithWhitespace(l.childNodes);d.cellLabelChanged(state.cell,n);d.setCellStyles("html",a,[e[f]])}else"0"==p&&"1"==a&&(n=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(n=n.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(n)),d.setCellStyles("html",
a,[e[f]]))}c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",e))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),e="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(e=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,e)});this.addAction("rotation",function(){var a="0",e=d.getView().getState(d.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||
a);a=new FilenameDialog(c,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");c.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);c.resetScrollbars()},null,null,"Home");this.addAction("zoomIn",function(a){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,c.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
this.addAction("zoomOut",function(a){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,c.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),e=d.view.translate,f=d.view.scale;a.x=a.x/f-e.x;a.y=a.y/f-e.y;a.width/=f;a.height/=f;null!=d.backgroundImage&&a.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height));0==a.width||0==a.height?(d.zoomTo(1),
@@ -2928,14 +2928,14 @@ c.resetScrollbars()):d.fitWindow(a)},null,null,Editor.ctrlKey+"+Shift+H");this.a
2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,e=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/e,(d.container.clientHeight-10)/a.height/e))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-
d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,
function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);
-!isNaN(a)&&0<a&&(a=new ChangePageSetup(c,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var n=null,n=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());c.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",
-function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;c.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(c);
-a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){c.setScrollbars(!c.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){c.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});
-n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;c.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());c.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});
-n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());c.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return c.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(c.showDialog((new AboutDialog(c)).container,320,280,!0,!0,function(){q=!1}),q=!0)}));n=mxUtils.bind(this,function(a,e,c,f){return this.addAction(a,function(){if(null!=c&&d.cellEditor.isContentEditing())c();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();
+!isNaN(a)&&0<a&&(a=new ChangePageSetup(c,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());c.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.isGridEnabled()});m.setEnabled(!1);m=this.addAction("guides",
+function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;c.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});m.setEnabled(!1);m=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(c);
+a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.foldingEnabled});m.isEnabled=k;m=this.addAction("scrollbars",function(){c.setScrollbars(!c.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){c.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});
+m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;c.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());c.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});
+m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());c.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=k;m=this.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.editor.autosave});m.isEnabled=k;m.visible=!1;this.addAction("help",function(){var a=
+"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(c.showDialog((new AboutDialog(c)).container,320,280,!0,!0,function(){q=!1}),q=!0)}));m=mxUtils.bind(this,function(a,e,c,f){return this.addAction(a,function(){if(null!=c&&d.cellEditor.isContentEditing())c();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();
d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,e,a);(e&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(e&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):(e&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=
-null;"U"==a.nodeName&&d.replaceElement(a)});for(var b=0;b<a.length;b++)0==d.model.getChildCount(a[b])&&d.autoSizeCell(a[b],!1)}finally{d.getModel().endUpdate()}}},null,null,f)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");
+null;"U"==a.nodeName&&d.replaceElement(a)});for(var b=0;b<a.length;b++)0==d.model.getChildCount(a[b])&&d.autoSizeCell(a[b],!1)}finally{d.getModel().endUpdate()}}},null,null,f)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");
this.addAction("fontColor...",function(){c.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){c.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){c.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){c.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){c.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});
this.addAction("borderColor...",function(){c.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){c.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){c.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",
@@ -2944,41 +2944,41 @@ function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASH
function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),e=d.getCurrentCellStyle(a[0]),f="1"==mxUtils.getValue(e,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,f);d.setCellStyles(mxConstants.STYLE_CURVED,null);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",
function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),e="1";null!=a&&null!=d.getFoldingImage(a)&&(e="0");d.setCellStyles("collapsible",e);c.fireEvent(new mxEventObject("styleChanged",
"keys",["collapsible"],"values",[e],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var e=d.getModel(),e=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",e.getStyle(a[0])||"",function(b){null!=b&&d.setCellStyle(mxUtils.trim(b),a)},null,null,400,220);this.editorUi.showDialog(e.container,420,300,!0,!0);e.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&
-!d.isSelectionEmpty()&&c.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&c.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var e=f.graph.selectionCellsHandler.getHandler(a);if(e instanceof mxEdgeHandler){for(var c=d.view.translate,p=d.view.scale,m=c.x,c=c.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);d.getModel().isVertex(a)&&
-null!=l;)m+=l.x,c+=l.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);m=Math.round(d.snap(d.popupMenuHandler.triggerX/p-m));p=Math.round(d.snap(d.popupMenuHandler.triggerY/p-c));e.addPointAt(e.state,m,p)}}});this.addAction("removeWaypoint",function(){var a=c.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var e=
-0;e<a.length;e++){var c=a[e];if(d.getModel().isEdge(c)){var f=d.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,d.getModel().setGeometry(c,f))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",
-!1,null)}),null,null,Editor.ctrlKey+"+.");n=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),f="";null!=e&&(f=e.style[mxConstants.STYLE_IMAGE]||f);var p=d.cellEditor.saveSelection();c.showImageDialog(a,
+!d.isSelectionEmpty()&&c.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&c.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var e=f.graph.selectionCellsHandler.getHandler(a);if(e instanceof mxEdgeHandler){for(var c=d.view.translate,p=d.view.scale,n=c.x,c=c.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);d.getModel().isVertex(a)&&
+null!=l;)n+=l.x,c+=l.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);n=Math.round(d.snap(d.popupMenuHandler.triggerX/p-n));p=Math.round(d.snap(d.popupMenuHandler.triggerY/p-c));e.addPointAt(e.state,n,p)}}});this.addAction("removeWaypoint",function(){var a=c.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var e=
+0;e<a.length;e++){var c=a[e];if(d.getModel().isEdge(c)){var f=d.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,d.getModel().setGeometry(c,f))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",
+!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),f="";null!=e&&(f=e.style[mxConstants.STYLE_IMAGE]||f);var p=d.cellEditor.saveSelection();c.showImageDialog(a,
f,function(a,b,e){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(p),d.insertImage(a,b,e);else{var c=d.getSelectionCells();if(null!=a&&(0<a.length||0<c.length)){var f=null;d.getModel().beginUpdate();try{if(0==c.length){var c=[d.insertVertex(d.getDefaultParent(),null,"",0,0,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],g=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(c,!0));c[0].geometry.x=g.x;c[0].geometry.y=g.y;f=c;d.fireEvent(new mxEventObject("cellsInserted",
-"cells",f))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,c);var l=d.getCurrentCellStyle(c[0]);"image"!=l[mxConstants.STYLE_SHAPE]&&"label"!=l[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",c):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,c);if(1==d.getSelectionCount()&&null!=b&&null!=e){var m=c[0],k=d.getModel().getGeometry(m);null!=k&&(k=k.clone(),k.width=b,k.height=e,d.getModel().setGeometry(m,k))}}finally{d.getModel().endUpdate()}null!=f&&(d.setSelectionCells(f),
-d.scrollCellToVisible(f[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(c,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),
-c.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,function(){c.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,
-function(){return 0<c.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(c,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,c,f,d,k){var n;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),n=mxResources.get(a)+"..."):n=mxResources.get(a);return this.put(a,new Action(n,c,f,d,k))};Actions.prototype.put=function(a,c){return this.actions[a]=c};Actions.prototype.get=function(a){return this.actions[a]};
+"cells",f))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,c);var l=d.getCurrentCellStyle(c[0]);"image"!=l[mxConstants.STYLE_SHAPE]&&"label"!=l[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",c):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,c);if(1==d.getSelectionCount()&&null!=b&&null!=e){var n=c[0],k=d.getModel().getGeometry(n);null!=k&&(k=k.clone(),k.width=b,k.height=e,d.getModel().setGeometry(n,k))}}finally{d.getModel().endUpdate()}null!=f&&(d.setSelectionCells(f),
+d.scrollCellToVisible(f[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(c,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),
+c.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",mxUtils.bind(this,function(){c.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,
+function(){return 0<c.formatWidth}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(c,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
+null,null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,c,f,d,k){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,c,f,d,k))};Actions.prototype.put=function(a,c){return this.actions[a]=c};Actions.prototype.get=function(a){return this.actions[a]};
function Action(a,c,f,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(c);this.enabled=null!=f?f:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=c||"";this.shadowPages=null;this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;
DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
-DrawioFile.prototype.updateFile=function(a,c,f,d){null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=k?this.mergeFile(k,a,c,d):this.reloadFile(a,c))}catch(n){null!=c&&c(n)}}),c))};
-DrawioFile.prototype.mergeFile=function(a,c,f,d){var k=!0;try{this.stats.fileMerged++;var n=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;var b=[this.ui.diffPages(null!=d?d:n,this.shadowPages)];if(!this.ignorePatches(b)){var e=this.ui.patchPages(n,
-b[0]);d={};var g=this.ui.getHashValueForPages(e,d),n={},p=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",b,"checksum",p==g,g);if(null!=g&&g!=p){var m=this.compressReportData(this.getAnonymizedXmlForPages(q)),l=this.compressReportData(this.getAnonymizedXmlForPages(e)),v=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,b,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+v+"\nTo: "+t+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+l,null,"mergeFile");return}this.patch(b,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=f&&f(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,D)}}catch(A){}}};
+DrawioFile.prototype.updateFile=function(a,c,f,d){null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=k?this.mergeFile(k,a,c,d):this.reloadFile(a,c))}catch(m){null!=c&&c(m)}}),c))};
+DrawioFile.prototype.mergeFile=function(a,c,f,d){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var b=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(b)){var e=this.ui.patchPages(m,
+b[0]);d={};var g=this.ui.getHashValueForPages(e,d),m={},p=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",b,"checksum",p==g,g);if(null!=g&&g!=p){var n=this.compressReportData(this.getAnonymizedXmlForPages(q)),l=this.compressReportData(this.getAnonymizedXmlForPages(e)),x=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,b,"Shadow Details: "+JSON.stringify(d)+
+"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+x+"\nTo: "+t+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+l,null,"mergeFile");return}this.patch(b,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=f&&f(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var y=this.getCurrentUser(),v=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),v,D)}}catch(z){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),f=c.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=c.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);f.appendChild(k)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(a,c,f){c=null!=c?c:1E4;null!=f&&null!=a&&a.length>f?a=a.substring(0,f)+"[...]":null!=a&&a.length>c&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,c,f,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var n=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+b+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?n(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?n(a):n(null)}),function(){})}else{var q=this.getCurrentUser(),b=null!=q?q.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+b+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+DrawioFile.prototype.checksumError=function(a,c,f,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var m=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+b+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var q=this.getCurrentUser(),b=null!=q?q.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+b+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+b+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(e){}}}catch(e){}};
-DrawioFile.prototype.sendErrorReport=function(a,c,f,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),q=this.getCurrentUser(),b=null!=q?this.ui.hashValue(q.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),p=g.lastIndexOf("."),q="xml";0<p&&(q=g.substring(p));var m=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(a,c,f,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),q=this.getCurrentUser(),b=null!=q?this.ui.hashValue(q.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),p=g.lastIndexOf("."),q="xml";0<p&&(q=g.substring(p));var n=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+q+")\nUser="+b+e+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:
-"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+k+"\n\nData:\n"+n,d)}catch(l){}};
-DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),f=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,c,f);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);null!=a&&
+"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+n+"\n\nShadow:\n"+k+"\n\nData:\n"+m,d)}catch(l){}};
+DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),f=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,c,f);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);null!=a&&
a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()}catch(d){null!=c&&c(d)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,f=0;f<a.length&&c;f++)c=c&&0==Object.keys(a[f]).length;return c};
-DrawioFile.prototype.patch=function(a,c){var f=this.ui.editor.undoManager,d=f.history.slice(),k=f.indexOfNextAdd,n=this.ui.editor.graph;n.container.style.visibility="hidden";var q=this.changeListenerEnabled;this.changeListenerEnabled=!1;var b=n.foldingEnabled,e=n.mathEnabled,g=n.cellRenderer.redraw;n.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());g.apply(this,arguments)};n.model.beginUpdate();try{for(var p=
-0;p<a.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[p],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{n.container.style.visibility="";n.model.endUpdate();n.cellRenderer.redraw=g;this.changeListenerEnabled=q;f.history=d;f.indexOfNextAdd=k;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)e!=
-n.mathEnabled?(this.ui.editor.updateGraphComponents(),n.refresh()):(b!=n.foldingEnabled?n.view.revalidate():n.view.validate(),n.sizeDidChange());this.ui.updateTabContainer()}};
-DrawioFile.prototype.save=function(a,c,f,d,k,n){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=f)f({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(q){if(null!=f)f(q);else throw q;}};
+DrawioFile.prototype.patch=function(a,c){var f=this.ui.editor.undoManager,d=f.history.slice(),k=f.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var q=this.changeListenerEnabled;this.changeListenerEnabled=!1;var b=m.foldingEnabled,e=m.mathEnabled,g=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());g.apply(this,arguments)};m.model.beginUpdate();try{for(var p=
+0;p<a.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[p],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=g;this.changeListenerEnabled=q;f.history=d;f.indexOfNextAdd=k;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)e!=
+m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(b!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}};
+DrawioFile.prototype.save=function(a,c,f,d,k,m){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=f)f({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(q){if(null!=f)f(q);else throw q;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,c,f){};DrawioFile.prototype.saveFile=function(a,c,f,d){};
DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(a){this.shadowModified=a};DrawioFile.prototype.setModified=function(a){this.shadowModified=this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,c,f){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,c,f){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -2995,9 +2995,9 @@ DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer
DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=Editor.guid());var a={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(a));EditorUi.debug("draft saved",this.draftId,a)}catch(c){console.error(c),this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(this.ui.removeDatabaseItem(".draft_"+this.draftId),EditorUi.debug("draft deleted",".draft_"+this.draftId))}catch(a){}};
DrawioFile.prototype.addUnsavedStatus=function(a){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(a instanceof Error&&null!=a.message&&""!=a.message){var c=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+" ("+mxUtils.htmlEntities(a.message)+")</div>")}else{c=this.getErrorMessage(a);if(null==c&&null!=this.lastSaved){var f=this.ui.timeSince(new Date(this.lastSaved));
-null!=f&&(c=mxResources.get("lastSaved",[f]))}null!=c&&60<c.length&&(c=c.substring(0,60)+"...");c=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=c&&""!=c?" ("+mxUtils.htmlEntities(c)+")":"");this.ui.editor.setStatus('<div title="'+c+'" class="geStatusAlertOrange" style="cursor:pointer;overflow:hidden;">'+c+' <img src="'+Editor.saveImage+'" align="top" style="width:16px;margin-top:-2px"/></div>');c=this.ui.statusContainer.getElementsByTagName("div");null!=c&&0<c.length?
-mxEvent.addListener(c[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):(c=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+" ("+mxUtils.htmlEntities(a.message)+")</div>"));EditorUi.enableDrafts&&null==this.getMode()&&(null!=this.saveDraftThread&&window.clearTimeout(this.saveDraftThread),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,
-function(){this.saveDraft()}),0))}};
+null!=f&&(c=mxResources.get("lastSaved",[f]))}null!=c&&60<c.length&&(c=c.substring(0,60)+"...");c=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=c&&""!=c?" ("+mxUtils.htmlEntities(c)+")":"");this.ui.editor.setStatus('<div title="'+c+'" class="geStatusAlertOrange" style="cursor:pointer;overflow:hidden;">'+c+' <img src="'+Editor.saveImage+'" align="top" style="width:16px;margin-top:'+(mxClient.IS_FF?-3:-2)+'px"/></div>');c=this.ui.statusContainer.getElementsByTagName("div");
+null!=c&&0<c.length?mxEvent.addListener(c[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):(c=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+" ("+mxUtils.htmlEntities(a.message)+")</div>"));EditorUi.enableDrafts&&null==this.getMode()&&(null!=this.saveDraftThread&&window.clearTimeout(this.saveDraftThread),this.saveDraftThread=
+window.setTimeout(mxUtils.bind(this,function(){this.saveDraft()}),0))}};
DrawioFile.prototype.addConflictStatus=function(a,c){this.invalidChecksum&&null==c&&(c=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=c&&""!=c?" ("+mxUtils.htmlEntities(c)+")":""));this.ui.spinner.stop();this.clearAutosave();var f=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=f&&0<f.length?mxEvent.addListener(f[0],"click",mxUtils.bind(this,function(c){"IMG"!=mxEvent.getSource(c).nodeName&&
a()})):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),a)};DrawioFile.prototype.setConflictStatus=function(a){this.ui.editor.setStatus('<div title="'+a+'" class="geStatusAlert geBlink" style="cursor:pointer;overflow:hidden;">'+a+' <a href="https://desk.draw.io/support/solutions/articles/16000087947" target="_blank"><img border="0" style="margin-left:2px;cursor:help;opacity:0.5;width:16px;height:16px;" valign="bottom" src="'+Editor.helpImage+'" style=""/></a></div>')};
DrawioFile.prototype.showRefreshDialog=function(a,c,f){null==f&&(f=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(a,c)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(a,c)}),f),this.ui.showError(mxResources.get("error")+" ("+f+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,
@@ -3009,24 +3009,24 @@ window.location.href=f});null==a&&this.isModified()?this.ui.confirm(mxResources.
k)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,c);else if(this.isModified()&&this.addUnsavedStatus(a),c)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var f=this.getErrorMessage(a);null!=f&&60<f.length&&(f=f.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=f?" ("+mxUtils.htmlEntities(f)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,c){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,f,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),n=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,f,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,d,k):this.invalidChecksum?this.showRefreshDialog(f,d,this.getErrorMessage(a)):c?this.showConflictDialog(k,n):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+DrawioFile.prototype.handleConflictError=function(a,c){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,f,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,f,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,d,k):this.invalidChecksum?this.showRefreshDialog(f,d,this.getErrorMessage(a)):c?this.showConflictDialog(k,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
this.synchronizeFile(f,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var c=null!=a?null!=a.error?a.error.message:a.message:null;null==c&&null!=a&&a.code==App.ERROR_TIMEOUT&&(c=mxResources.get("timeout"));return c};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=
this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.createSecret=function(a){var c=Editor.guid(32);null!=this.sync?this.sync.createToken(c,mxUtils.bind(this,function(f){a(c,f)}),mxUtils.bind(this,function(){a(c)})):a(c)};
-DrawioFile.prototype.fileSaved=function(a,c,f,d,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=f&&f()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,f,d,k)}catch(b){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(b);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,b);else{var n=
-this.getCurrentUser(),q=null!=n?n.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),q,b)}}catch(e){}}};
+DrawioFile.prototype.fileSaved=function(a,c,f,d,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=f&&f()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,f,d,k)}catch(b){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(b);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,b);else{var m=
+this.getCurrentUser(),q=null!=m?m.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),q,b)}}catch(e){}}};
DrawioFile.prototype.autosave=function(a,c,f,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<c?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=f&&f(a)}),mxUtils.bind(this,
function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,c){if(null!=a&&null!=c){var f=a.lastIndexOf("."),d=0<f?a.substring(f):"",f=c.lastIndexOf(".");return d===(0<f?c.substring(f):"")}return a==c};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,c){a([])};DrawioFile.prototype.addComment=function(a,c,f){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,c){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,c)};LocalFile=function(a,c,f,d,k,n){DrawioFile.call(this,a,c);this.title=f;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=n};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,c){a([])};DrawioFile.prototype.addComment=function(a,c,f){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,c){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,c)};LocalFile=function(a,c,f,d,k,m){DrawioFile.call(this,a,c);this.title=f;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=m};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return null==this.fileHandle};LocalFile.prototype.save=function(a,c,f){this.saveAs(this.title,c,f)};LocalFile.prototype.saveAs=function(a,c,f){this.saveFile(a,!1,c,f)};LocalFile.prototype.saveAs=function(a,c,f){this.saveFile(a,!1,c,f)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(a){this.desc=a};
LocalFile.prototype.getLatestVersion=function(a,c){null==this.fileHandle?a(null):this.ui.loadFileSystemEntry(this.fileHandle,a,c)};
-LocalFile.prototype.saveFile=function(a,c,f,d,k){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;k||this.updateFileData();var n=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);c=this.getData();var q=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),b=mxUtils.bind(this,function(b){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
-function(a){this.savingFile=!1;null!=d&&d({error:a})});this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(c){this.desc.lastModified==c.lastModified?a.write(n?this.ui.base64ToBlob(b,"image/png"):b).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){this.savingFile=!1;this.desc=a;q()}),e)}),e)}),e):(this.inConflictState=!0,e())}),e)}),e)}}else{if(this.ui.isOfflineApp()||
-this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,n?"image/png":"text/xml",n);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+(n?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));q()}});n?(k=this.ui.getPngFileProperties(this.ui.fileNode),
+LocalFile.prototype.saveFile=function(a,c,f,d,k){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;k||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);c=this.getData();var q=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),b=mxUtils.bind(this,function(b){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
+function(a){this.savingFile=!1;null!=d&&d({error:a})});this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(c){this.desc.lastModified==c.lastModified?a.write(m?this.ui.base64ToBlob(b,"image/png"):b).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){this.savingFile=!1;this.desc=a;q()}),e)}),e)}),e):(this.inConflictState=!0,e())}),e)}),e)}}else{if(this.ui.isOfflineApp()||
+this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,m?"image/png":"text/xml",m);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+(m?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));q()}});m?(k=this.ui.getPngFileProperties(this.ui.fileNode),
this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){b(a)}),d,this.ui.getCurrentFile()!=this?c:null,k.scale,k.border)):b(c)};LocalFile.prototype.rename=function(a,c,f){this.title=a;this.descriptorChanged();null!=c&&c()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio"},{description:"diagramPngDesc",extension:"png"},{description:"diagramSvgDesc",extension:"svg"},{description:"diagramHtmlDesc",extension:"html"},{description:"diagramXmlDesc",extension:"xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",
extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",
fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",
@@ -3045,29 +3045,30 @@ Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3d
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=":
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
-Editor.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"/>');Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,
-isVisible:function(a,b){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
-isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",
-defVal:0,min:0,max:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",
-dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",
-type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",
-type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},
-{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},
-{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",
-dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(a,
-b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(e,"resizeLastRow","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(e,
-"resizeLast","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",dispName:"Fill"},{val:"width",
-dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(a,b){return b.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",
-type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",
-dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,b){var e=
-1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isSwimlane(e)||0<c.model.getChildCount(e))},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isContainer(e)&&"0"!=a.style.collapsible||!c.isContainer(e)&&"1"==a.style.collapsible)},
-isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length&&!b.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,b){var e=b.editorUi.editor.graph.model;return 0<a.vertices.length?
-e.isVertex(e.getParent(a.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,b){var e=0<a.vertices.length?b.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=e&&!e.relative}},
-{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",
-defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,b){var e=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return b.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==e||e==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,b){return 0<a.vertices.length&&b.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.createRoughCanvas=function(a){var b=rough.canvas({getContext:function(){return a}});b.draw=function(b){var e=b.sets||[];b=b.options||this.getDefaultOptions();for(var c=0;c<e.length;c++){var d=e[c];switch(d.type){case "path":null!=b.stroke&&this._drawToContext(a,d,b);break;case "fillPath":this._drawToContext(a,d,b);break;case "fillSketch":this.fillSketch(a,d,b)}}};b.fillSketch=function(b,e,c){var d=a.state.strokeColor,f=a.state.strokeWidth,g=a.state.strokeAlpha,l=a.state.dashed,m=c.fillWeight;
-0>m&&(m=c.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(c.fill||"");a.setStrokeWidth(m);a.setDashed(!1);this._drawToContext(b,e,c);a.setDashed(l);a.setStrokeWidth(f);a.setStrokeColor(d);a.setStrokeAlpha(g)};b._drawToContext=function(a,b,e){a.begin();for(var c=0;c<b.ops.length;c++){var d=b.ops[c],f=d.data;switch(d.op){case "move":a.moveTo(f[0],f[1]);break;case "bcurveTo":a.curveTo(f[0],f[1],f[2],f[3],f[4],f[5]);break;case "lineTo":a.lineTo(f[0],f[1])}}a.end();"fillPath"===b.type&&
+Editor.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"/>');Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",
+type:"bool",defVal:!1,isVisible:function(a,b){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",
+type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",
+type:"float",defVal:0,min:0,max:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":
+"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",
+dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",
+dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",
+dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",
+type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},
+{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",
+type:"bool",getDefaultValue:function(a,b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(e,"resizeLastRow","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:
+null);return"1"==mxUtils.getValue(e,"resizeLast","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",
+dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(a,b){return b.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",
+type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isSwimlane(e)||0<c.model.getChildCount(e))},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isContainer(e)&&"0"!=a.style.collapsible||
+!c.isContainer(e)&&"1"==a.style.collapsible)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length&&!b.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,b){var e=
+b.editorUi.editor.graph.model;return 0<a.vertices.length?e.isVertex(e.getParent(a.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,b){var e=0<a.vertices.length?b.editorUi.editor.graph.getCellGeometry(a.vertices[0]):
+null;return null!=e&&!e.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",
+dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,b){var e=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return b.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==e||e==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,b){return 0<a.vertices.length&&b.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);
+Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
+Editor.createRoughCanvas=function(a){var b=rough.canvas({getContext:function(){return a}});b.draw=function(b){var e=b.sets||[];b=b.options||this.getDefaultOptions();for(var c=0;c<e.length;c++){var d=e[c];switch(d.type){case "path":null!=b.stroke&&this._drawToContext(a,d,b);break;case "fillPath":this._drawToContext(a,d,b);break;case "fillSketch":this.fillSketch(a,d,b)}}};b.fillSketch=function(b,e,c){var d=a.state.strokeColor,f=a.state.strokeWidth,g=a.state.strokeAlpha,l=a.state.dashed,n=c.fillWeight;
+0>n&&(n=c.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(c.fill||"");a.setStrokeWidth(n);a.setDashed(!1);this._drawToContext(b,e,c);a.setDashed(l);a.setStrokeWidth(f);a.setStrokeColor(d);a.setStrokeAlpha(g)};b._drawToContext=function(a,b,e){a.begin();for(var c=0;c<b.ops.length;c++){var d=b.ops[c],f=d.data;switch(d.op){case "move":a.moveTo(f[0],f[1]);break;case "bcurveTo":a.curveTo(f[0],f[1],f[2],f[3],f[4],f[5]);break;case "lineTo":a.lineTo(f[0],f[1])}}a.end();"fillPath"===b.type&&
e.filled?a.fill():a.stroke()};return b};(function(){function a(b,e,c){this.canvas=b;this.rc=e;this.shape=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,a.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,a.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,a.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,a.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,a.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,a.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,a.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,a.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
a.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,a.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,a.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,a.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,a.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,a.prototype.fillAndStroke);
@@ -3077,7 +3078,7 @@ d=null;(e.filled=b)?(e.fill="none"===this.canvas.state.fillColor?"":this.canvas.
f);f=mxUtils.getValue(this.shape.style,"fillWeight",-1);e.fillWeight="auto"==f?-1:f;f=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==f&&(f=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",f=null!=e.fill&&(null!=d||null!=f&&e.fill.toLowerCase()==f.toLowerCase())?"solid":c.fillStyle);e.fillStyle=f;return e};a.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};a.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};a.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=2;a<arguments.length;a+=2)this.lastX=arguments[a-1],this.lastY=arguments[a],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};a.prototype.lineTo=function(a,b){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,a,b),this.lastX=a,this.lastY=b)};a.prototype.moveTo=
function(a,b){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,a,b),this.lastX=a,this.lastY=b,this.firstX=a,this.firstY=b)};a.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};a.prototype.quadTo=function(a,b,e,c){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,a,b,e,c),this.lastX=e,this.lastY=c)};a.prototype.curveTo=function(a,b,e,c,d,f){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,b,e,c,d,f),this.lastX=d,this.lastY=f)};a.prototype.arcTo=function(a,b,e,c,d,f,g){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var l=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,e,c,d,f,g);if(null!=l)for(var m=0;m<l.length;m+=6)this.curveTo(l[m],l[m+1],l[m+2],l[m+3],l[m+4],l[m+5]);this.lastX=f;this.lastY=g}};a.prototype.rect=function(a,b,e,c){this.passThrough?this.originalRect.apply(this.canvas,
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,b,e,c,d,f),this.lastX=d,this.lastY=f)};a.prototype.arcTo=function(a,b,e,c,d,f,g){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var l=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,e,c,d,f,g);if(null!=l)for(var n=0;n<l.length;n+=6)this.curveTo(l[n],l[n+1],l[n+2],l[n+3],l[n+4],l[n+5]);this.lastX=f;this.lastY=g}};a.prototype.rect=function(a,b,e,c){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(a,b,e,c,this.getStyle(!0,!0)))};a.prototype.ellipse=function(a,b,e,c){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(a+e/2,b+c/2,e,c,this.getStyle(!0,!0)))};a.prototype.roundrect=function(a,b,e,c,d,f){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(a+d,b),this.lineTo(a+e-d,b),this.quadTo(a+e,b,a+e,b+f),this.lineTo(a+
e,b+c-f),this.quadTo(a+e,b+c,a+e-d,b+c),this.lineTo(a+d,b+c),this.quadTo(a,b+c,a,b+c-f),this.lineTo(a,b+f),this.quadTo(a,b,a+d,b))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(H){}this.passThrough=!1}else if(null!=this.nextShape){for(var b in a)this.nextShape.options[b]=a[b];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};a.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};a.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};a.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};a.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
@@ -3088,7 +3089,7 @@ c||(b.save(),c=this.fill,d=this.stroke,this.stroke=this.fill=null,b.handJiggle.p
a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=c&&0<c.length)for(var f=0;f<c.length;f++)if("mxgraph"==c[f].getAttribute("class")){d.push(c[f]);break}0<d.length&&(c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(a=mxUtils.parseXml(d.xml),a=a.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(c=mxUtils.getTextContent(d[0]),c=Graph.decompress(c,null,e),0<c.length&&(a=mxUtils.parseXml(c),a=a.documentElement))))}if(null!=
a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=
d&&(a=Editor.parseDiagramNode(d,e)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,b){var e=mxUtils.trim(mxUtils.getTextContent(a)),c=null;0<e.length?(e=Graph.decompress(e,null,b),null!=e&&0<e.length&&(c=mxUtils.parseXml(e).documentElement)):(e=mxUtils.getChildNodes(a),0<e.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(e[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml=function(a){var b=mxUtils.getTextContent(a),
-e=null;0<b.length?e=Graph.decompress(b):null!=a.firstChild&&(e=mxUtils.getXml(a.firstChild));return e};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var b=null,e="",c=0,d=0,f=[],g=null;d<a.length;){var l=a.charCodeAt(d),d=d+1;10!=l&&(e+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var m=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(m>d){b=a.substring(d,m);break}}10==l&&("endobj"==
+e=null;0<b.length?e=Graph.decompress(b):null!=a.firstChild&&(e=mxUtils.getXml(a.firstChild));return e};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var b=null,e="",c=0,d=0,f=[],g=null;d<a.length;){var l=a.charCodeAt(d),d=d+1;10!=l&&(e+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var n=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(n>d){b=a.substring(d,n);break}}10==l&&("endobj"==
e?g=null:"obj"==e.substring(e.length-3,e.length)||"xref"==e||"trailer"==e?(g=[],f[e.split(" ")[0]]=g):null!=g&&g.push(e),e="")}null==b&&(b=Editor.extractGraphModelFromXref(f));null!=b&&(b=decodeURIComponent(b.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return b};Editor.extractGraphModelFromXref=function(a){var b=a.trailer,e=null;null!=b&&(b=/.* \/Info (\d+) (\d+) R/g.exec(b.join("\n")),null!=b&&0<b.length&&(b=a[b[1]],null!=b&&(b=/.* \/Subject (\d+) (\d+) R/g.exec(b.join("\n")),null!=b&&0<b.length&&
(a=a[b[1]],null!=a&&(a=a.join("\n"),e=a.substring(1,a.length-1))))));return e};Editor.extractGraphModelFromPng=function(a){var b=null;try{var e=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,e,d){a=c.substring(a+8,a+8+d);"zTXt"==e?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==e&&
(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(b=a[1]));if(null!=b||"IDAT"==e)return!0}))}catch(O){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.extractParserError=function(a,b){var e=null,c=null!=a?a.getElementsByTagName("parsererror"):null;null!=c&&0<c.length&&(e=b||mxResources.get("invalidChars"),c=c[0].getElementsByTagName("div"),0<c.length&&(e=mxUtils.getTextContent(c[0])));
@@ -3115,28 +3116,28 @@ var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\
return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,e=this;a.convert=function(c){if(null!=c){var d="http://"==c.substring(0,7)||"https://"==c.substring(0,8);d&&!navigator.onLine?c=Editor.svgBrokenImage.src:!d||c.substring(0,a.baseUrl.length)==a.baseUrl||e.crossOriginImages&&e.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,
19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,b){try{var e=!0,c=window.setTimeout(mxUtils.bind(this,function(){e=!1;b(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);e&&b(Editor.createSvgDataUri(a.getText()))}),
function(){window.clearTimeout(c);e&&b(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(c);if(e)try{var a=document.createElement("canvas"),f=a.getContext("2d");a.height=d.height;a.width=d.width;f.drawImage(d,0,0);b(a.toDataURL())}catch(fa){b(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(c);e&&b(Editor.svgBrokenImage.src)};d.src=a}}catch(H){b(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(a,b,e,c){null==c&&(c=this.createImageUrlConverter());var d=0,f=e||{};e=mxUtils.bind(this,function(e,g){for(var l=a.getElementsByTagName(e),m=0;m<l.length;m++)mxUtils.bind(this,function(e){try{if(null!=e){var l=c.convert(e.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var m=f[l];null==m?(d++,this.convertImageToDataUri(l,function(c){null!=c&&(f[l]=c,e.setAttribute(g,c));d--;0==d&&b(a)})):e.setAttribute(g,m)}else null!=l&&e.setAttribute(g,l)}}catch(ha){}})(l[m])});e("image","xlink:href");
+function(a,b,e,c){null==c&&(c=this.createImageUrlConverter());var d=0,f=e||{};e=mxUtils.bind(this,function(e,g){for(var l=a.getElementsByTagName(e),n=0;n<l.length;n++)mxUtils.bind(this,function(e){try{if(null!=e){var l=c.convert(e.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var n=f[l];null==n?(d++,this.convertImageToDataUri(l,function(c){null!=c&&(f[l]=c,e.setAttribute(g,c));d--;0==d&&b(a)})):e.setAttribute(g,n)}else null!=l&&e.setAttribute(g,l)}}catch(ha){}})(l[n])});e("image","xlink:href");
e("img","src");0==d&&b(a)};Editor.base64Encode=function(a){for(var b="",e=0,c=a.length,d,f,g;e<c;){d=a.charCodeAt(e++)&255;if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}f=a.charCodeAt(e++);if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&
3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(e++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};
-Editor.prototype.loadUrl=function(a,b,e,c,d,f,g,l){try{var m=!g&&(c||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var p=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var c=a.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
-for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);c=c.join("")}f=null!=f?f:"data:image/png;base64,";c=f+Editor.base64Encode(c)}b(c)}}else null!=e&&(0==a.getStatus()?e({message:mxResources.get("accessDenied")},a):e({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=e&&e({message:mxResources.get("error")+" "+a.getStatus()})},m,this.timeout,function(){d&&null!=e&&e({code:App.ERROR_TIMEOUT,retry:p})},l)});p()}catch(Y){null!=e&&e(Y)}};Editor.prototype.absoluteCssFonts=
+Editor.prototype.loadUrl=function(a,b,e,c,d,f,g,l){try{var n=!g&&(c||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var p=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var c=a.getText();if(n){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
+for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);c=c.join("")}f=null!=f?f:"data:image/png;base64,";c=f+Editor.base64Encode(c)}b(c)}}else null!=e&&(0==a.getStatus()?e({message:mxResources.get("accessDenied")},a):e({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=e&&e({message:mxResources.get("error")+" "+a.getStatus()})},n,this.timeout,function(){d&&null!=e&&e({code:App.ERROR_TIMEOUT,retry:p})},l)});p()}catch(Y){null!=e&&e(Y)}};Editor.prototype.absoluteCssFonts=
function(a){var b=null;if(null!=a){var e=a.split("url(");if(0<e.length){b=[e[0]];a=window.location.pathname;var c=null!=a?a.lastIndexOf("/"):-1;0<=c&&(a=a.substring(0,c+1));var c=document.getElementsByTagName("base"),d=null;null!=c&&0<c.length&&(d=c[0].getAttribute("href"));for(var f=1;f<e.length;f++)if(c=e[f].indexOf(")"),0<c){var g=Editor.trimCssUrl(e[f].substring(0,c));this.graph.isRelativeUrl(g)&&(g=null!=d?d+g:window.location.protocol+"//"+window.location.hostname+("/"==g.charAt(0)?"":a)+g);
b.push('url("'+g+'"'+e[f].substring(c))}else b.push(e[f])}else b=[a]}return null!=b?b.join(""):null};Editor.prototype.embedCssFonts=function(a,b){var e=a.split("url("),c=0;null==this.cachedFonts&&(this.cachedFonts={});var d=mxUtils.bind(this,function(){if(0==c){for(var a=[e[0]],d=1;d<e.length;d++){var f=e[d].indexOf(")");a.push('url("');a.push(this.cachedFonts[Editor.trimCssUrl(e[d].substring(0,f))]);a.push('"'+e[d].substring(f))}b(a.join(""))}});if(0<e.length){for(var f=1;f<e.length;f++){var g=e[f].indexOf(")"),
-l=null,m=e[f].indexOf("format(",g);0<m&&(l=Editor.trimCssUrl(e[f].substring(m+7,e[f].indexOf(")",m))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;c++;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";
+l=null,n=e[f].indexOf("format(",g);0<n&&(l=Editor.trimCssUrl(e[f].substring(n+7,e[f].indexOf(")",n))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;c++;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 e=a;/^https?:\/\//.test(e)&&!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(e,mxUtils.bind(this,function(b){this.cachedFonts[a]=b;c--;d()}),mxUtils.bind(this,function(a){c--;d()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(Editor.trimCssUrl(e[f].substring(0,g)),l)}d()}else b(a)};Editor.prototype.loadFonts=
function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(b){this.resolvedFontCss=b;a()})):a()};Editor.prototype.embedExtFonts=function(a){var b=this.graph.extFonts;if(null!=b&&0<b.length){var e="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(e,a)}),f=0;f<b.length;f++)mxUtils.bind(this,function(a,b){0==b.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[b]?
(c++,this.loadUrl(b,mxUtils.bind(this,function(a){this.cachedGoogleFonts[b]=a;e+=a;c--;d()}),mxUtils.bind(this,function(a){c--;e+="@import url("+b+");";d()}))):e+=this.cachedGoogleFonts[b]:e+='@font-face {font-family: "'+a+'";src: url("'+b+'");}'})(b[f].name,b[f].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),e=0;e<b.length;e++)0<mxUtils.getTextContent(b[e]).indexOf("MathJax")&&a[0].appendChild(b[e].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,b){b=null!=b?b:this.absoluteCssFonts(this.fontCss);if(null!=b){var e=a.getElementsByTagName("defs"),c=a.ownerDocument;0==e.length?(e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=e[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,b);e.appendChild(c)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,e,c,d,f,g,l,m,p,t,k,n,y,v,x){try{f=null!=f?f:!0;g=null!=g?g:!0;k=null!=k?k:this.graph;n=null!=n?n:0;var u=m?null:k.background;u==mxConstants.NONE&&(u=null);null==u&&(u=c);null==u&&0==m&&(u=x?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(k.getSvg(null,null,null,y,null,g,null,null,null,p,null,x),mxUtils.bind(this,function(e){try{var c=
-new Image;c.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(c,n/l,n/l);a(m)},0):(y.drawImage(c,n/l,n/l),a(m))},m=document.createElement("canvas"),p=parseInt(e.getAttribute("width")),t=parseInt(e.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*t),b/p)):b/p);p=Math.ceil(l*p)+2*n;t=Math.ceil(l*t)+2*n;m.setAttribute("width",p);m.setAttribute("height",t);var y=m.getContext("2d");null!=u&&(y.beginPath(),y.rect(0,
-0,p,t),y.fillStyle=u,y.fill());y.scale(l,l);if(v){var x=k.view,B=x.scale;x.scale=1;var z=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));x.scale=B;var z="data:image/svg+xml;base64,"+z,q=k.gridSize*x.gridSteps*l,A=k.getGraphBounds(),D=x.translate.x*B,K=x.translate.y*B,C=D+(A.x-D)/B,H=K+(A.y-K)/B,E=new Image;E.onload=function(){try{for(var a=-Math.round(q-mxUtils.mod((D-C)*l,q)),b=-Math.round(q-mxUtils.mod((K-H)*l,q));a<p;a+=q)for(var e=b;e<t;e+=q)y.drawImage(E,a/l,e/l);g()}catch(ma){null!=
-d&&d(ma)}};E.onerror=function(a){null!=d&&d(a)};E.src=z}else g()}catch(pa){null!=d&&d(pa)}});c.onerror=function(a){null!=d&&d(a)};p&&this.graph.addSvgShadow(e);this.graph.mathEnabled&&this.addMathCss(e);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(e,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(e))}catch(P){null!=d&&d(P)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(e,a),this.loadFonts(g)}catch(T){null!=
-d&&d(T)}}))}catch(P){null!=d&&d(P)}}),e,t)}catch(Q){null!=d&&d(Q)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var n=k,q=0;8>q;q++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[k]=n;Editor.updateCRC=function(a,b,e,c){for(var d=0;d<c;d++)a=Editor.crcTable[(a^b.charCodeAt(e+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var b=-1,e=0;e<a.length;e++)b=b>>>8^Editor.crcTable[(b^a.charCodeAt(e))&255];return(b^-1)>>>0};Editor.writeGraphModelToPng=function(a,b,e,c,d){function f(a,b){var e=m;m+=
-b;return a.substring(e,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 l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(f(a,4),"IHDR"!=f(a,4))null!=d&&d();else{f(a,17);d=a.substring(0,m);do{var p=g(a);if("IDAT"==f(a,4)){d=a.substring(0,
-m-8);"pHYs"==b&&"dpi"==e?(e=Math.round(c/.0254),e=l(e)+l(e)+String.fromCharCode(1)):e=e+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+c;c=4294967295;c=Editor.updateCRC(c,b,0,4);c=Editor.updateCRC(c,e,0,e.length);d+=l(e.length)+b+e+l(c^4294967295);d+=a.substring(m-8,a.length);break}d+=a.substring(m-8,m-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,e,c,d,f,g,l,n,p,t,k,m,y,x,v){try{f=null!=f?f:!0;g=null!=g?g:!0;k=null!=k?k:this.graph;m=null!=m?m:0;var u=n?null:k.background;u==mxConstants.NONE&&(u=null);null==u&&(u=c);null==u&&0==n&&(u=v?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(k.getSvg(null,null,m,y,null,g,null,null,null,p,null,v),mxUtils.bind(this,function(e){try{var c=new Image;
+c.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(c,0,0);a(n)},0):(y.drawImage(c,0,0),a(n))},n=document.createElement("canvas"),p=parseInt(e.getAttribute("width")),t=parseInt(e.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*t),b/p)):b/p);p=Math.ceil(l*p);t=Math.ceil(l*t);n.setAttribute("width",p);n.setAttribute("height",t);var y=n.getContext("2d");null!=u&&(y.beginPath(),y.rect(0,0,p,t),y.fillStyle=u,
+y.fill());y.scale(l,l);if(x){var v=k.view,B=v.scale;v.scale=1;var A=btoa(unescape(encodeURIComponent(v.createSvgGrid(v.gridColor))));v.scale=B;var A="data:image/svg+xml;base64,"+A,q=k.gridSize*v.gridSteps*l,z=k.getGraphBounds(),D=v.translate.x*B,K=v.translate.y*B,C=D+(z.x-D)/B-m,H=K+(z.y-K)/B-m,E=new Image;E.onload=function(){try{for(var a=-Math.round(q-mxUtils.mod((D-C)*l,q)),b=-Math.round(q-mxUtils.mod((K-H)*l,q));a<p;a+=q)for(var e=b;e<t;e+=q)y.drawImage(E,a/l,e/l);g()}catch(ma){null!=d&&d(ma)}};
+E.onerror=function(a){null!=d&&d(a)};E.src=A}else g()}catch(pa){null!=d&&d(pa)}});c.onerror=function(a){null!=d&&d(a)};p&&this.graph.addSvgShadow(e);this.graph.mathEnabled&&this.addMathCss(e);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(e,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(e))}catch(P){null!=d&&d(P)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(e,a),this.loadFonts(g)}catch(T){null!=d&&d(T)}}))}catch(P){null!=
+d&&d(P)}}),e,t)}catch(Q){null!=d&&d(Q)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var m=k,q=0;8>q;q++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[k]=m;Editor.updateCRC=function(a,b,e,c){for(var d=0;d<c;d++)a=Editor.crcTable[(a^b.charCodeAt(e+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var b=-1,e=0;e<a.length;e++)b=b>>>8^Editor.crcTable[(b^a.charCodeAt(e))&255];return(b^-1)>>>0};Editor.writeGraphModelToPng=function(a,b,e,c,d){function f(a,b){var e=n;n+=b;return a.substring(e,n)}
+function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(f(a,4),"IHDR"!=f(a,4))null!=d&&d();else{f(a,17);d=a.substring(0,n);do{var p=g(a);if("IDAT"==f(a,4)){d=a.substring(0,n-8);"pHYs"==b&&"dpi"==
+e?(e=Math.round(c/.0254),e=l(e)+l(e)+String.fromCharCode(1)):e=e+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+c;c=4294967295;c=Editor.updateCRC(c,b,0,4);c=Editor.updateCRC(c,e,0,e.length);d+=l(e.length)+b+e+l(c^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
var b=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,e){b.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)?e=b.getId():null!=a.currentPage&&
(e=a.currentPage.getId());return e});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.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 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,e=b.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return e.shadowVisible},function(a){var c=new ChangePageSetup(b);c.ignoreColor=!0;c.ignoreImage=
+return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var n=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,e=b.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return e.shadowVisible},function(a){var c=new ChangePageSetup(b);c.ignoreColor=!0;c.ignoreImage=
!0;c.shadowVisible=a;e.model.execute(c)},{install:function(a){this.listener=function(){a(e.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var l=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=l.apply(this,arguments);var b=this.editorUi,
e=b.editor.graph;if(e.isEnabled()){var c=b.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a);b.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&
e.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return e.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(e.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var f=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
@@ -3163,35 +3164,35 @@ stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,e){if(null!=b){var c=function(a){if(null!=a)if(e)for(var c=
0;c<a.length;c++)b[a[c].name]=a[c];else for(var d in b){for(var f=!1,c=0;c<a.length;c++)if(a[c].name==d&&a[c].type==b[d].type){f=!0;break}f||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
-c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(H){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,c=a.edges,d=0;d<e.length;d++)this.findCommonProperties(e[d],b,0==d);for(d=0;d<c.length;d++)this.findCommonProperties(c[d],
+c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(H){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,c=a.edges,d=0;d<e.length;d++)this.findCommonProperties(e[d],b,0==d);for(d=0;d<c.length;d++)this.findCommonProperties(c[d],
b,0==e.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var t=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 t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
function(a,b,e){function c(a,b,e,c){k.getModel().beginUpdate();try{var d=[],f=[];if(null!=e.index){for(var g=[],l=e.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;e.index<g.length?null!=c?g.splice(c,1):g[e.index]=b:g.push(b);null!=e.size&&g.length>e.size&&(g=g.slice(0,e.size));b=g.join(",");null!=e.countProperty&&(k.setCellStyles(e.countProperty,g.length,k.getSelectionCells()),d.push(e.countProperty),f.push(g.length))}k.setCellStyles(a,
-b,k.getSelectionCells());d.push(a);f.push(b);if(null!=e.dependentProps)for(a=0;a<e.dependentProps.length;a++){var m=e.dependentPropsDefVal[a],p=e.dependentPropsVals[a];if(p.length>b)p=p.slice(0,b);else for(var n=p.length;n<b;n++)p.push(m);p=p.join(",");k.setCellStyles(e.dependentProps[a],p,k.getSelectionCells());d.push(e.dependentProps[a]);f.push(p)}if("function"==typeof e.onChange)e.onChange(k,b);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",f,"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}}
+b,k.getSelectionCells());d.push(a);f.push(b);if(null!=e.dependentProps)for(a=0;a<e.dependentProps.length;a++){var n=e.dependentPropsDefVal[a],p=e.dependentPropsVals[a];if(p.length>b)p=p.slice(0,b);else for(var m=p.length;m<b;m++)p.push(n);p=p.join(",");k.setCellStyles(e.dependentProps[a],p,k.getSelectionCells());d.push(e.dependentProps[a]);f.push(p)}if("function"==typeof e.onChange)e.onChange(k,b);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",f,"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}}
function d(b,e,c){var d=mxUtils.getOffset(a,!0),f=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=f.x-d.x+"px";e.style.top=f.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function f(a,b,e){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,
-function(f){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(f)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,b,e,d,f,g,l){null!=b&&(b=b.split(","),n.push({name:a,values:b,type:e,defVal:d,countProperty:f,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var m=g,t=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==
-a)m=m.nextSibling,t++;else break;var k={type:e,parentRow:g,index:t,isDeletable:!0,defVal:d,countProperty:f},t=p(a,"",k,0==t%2,l);c(a,d,k);m.parentNode.insertBefore(t,m.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,b,e,c,d,f,g){if(0<d){var l=Array(d);b=null!=b?b.split(","):[];for(var m=0;m<d;m++)l[m]=null!=b[m]?b[m]:null!=c?c:"";n.push({name:a,values:l,type:e,defVal:c,parentRow:f,flipBkg:g,size:d})}return document.createElement("div")}
-function m(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function p(b,e,p,k,n){var v=p.dispName,y=p.type,u=document.createElement("tr");u.className="gePropRow"+(n?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",b);u.setAttribute("data-pValue",e);k=!1;null!=p.index&&(u.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",k=!0);var x=document.createElement("td");
-x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));k&&(x.style.textAlign="right");u.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==y)x.appendChild(f(b,e,p));else if("bool"==y||"boolean"==y)x.appendChild(m(b,e,p));else if("enum"==y){var B=p.enumList;for(n=0;n<B.length;n++)if(v=B[n],v.val==e){x.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(t,function(){var f=
-document.createElement("select");d(x,f);for(var g=0;g<B.length;g++){var l=B[g],m=document.createElement("option");m.value=mxUtils.htmlEntities(l.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(m)}f.value=e;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);c(b,a,p)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==y?x.appendChild(g(b,e,p.subType,p.subDefVal,p.countProperty,
-u,n)):"staticArr"==y?x.appendChild(l(b,e,p.subType,p.subDefVal,p.size,u,n)):(x.innerHTML=e,mxEvent.addListener(x,"click",mxUtils.bind(t,function(){function f(){var a=g.value,a=0==a.length&&"string"!=y?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(b,a,p)}var g=document.createElement("input");d(x,g,!0);g.value=e;g.className=
-"gePropEditor";"int"!=y&&"float"!=y||p.allowAuto||(g.type="number",g.step="int"==y?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&f()});g.focus();mxEvent.addListener(g,"blur",function(){f()})})));p.isDeletable&&(n=mxUtils.button("-",mxUtils.bind(t,function(a){c(b,"",p,p.index);mxEvent.consume(a)})),n.style.height="16px",n.style.width="25px",n.style["float"]="right",n.className="geColorBtn",
-x.appendChild(n));u.appendChild(x);return u}var t=this,k=this.editorUi.editor.graph,n=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var x=document.createElement("img");x.src=Sidebar.prototype.expandedImage;u.appendChild(x);mxUtils.write(u,mxResources.get("property"));
-v.style.cursor="pointer";var B=function(){var b=y.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){x.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],f=d.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||a.removeChild(d)}catch(qa){}}else x.src=Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;
-B()});v.appendChild(u);u=document.createElement("th");u.className="gePropHeaderCell";u.innerHTML=mxResources.get("value");v.appendChild(u);y.appendChild(v);var z=!1,q=!1,A;for(A in b)if(v=b[A],"function"!=typeof v.isVisible||v.isVisible(e,this)){var D=null!=e.style[A]?mxUtils.htmlEntities(e.style[A]+""):null!=v.getDefaultValue?v.getDefaultValue(e,this):v.defVal;if("separator"==v.type)q=!q;else{if("staticArr"==v.type)v.size=parseInt(e.style[v.sizeProperty]||b[v.sizeProperty].defVal)||0;else if(null!=
-v.dependentProps){for(var C=v.dependentProps,E=[],K=[],u=0;u<C.length;u++){var G=e.style[C[u]];K.push(b[C[u]].subDefVal);E.push(null!=G?G.split(","):[])}v.dependentPropsDefVal=K;v.dependentPropsVals=E}y.appendChild(p(A,D,v,z,q));z=!z}}for(u=0;u<n.length;u++)for(v=n[u],b=v.parentRow,e=0;e<v.values.length;e++)A=p(v.name,v.values[e],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:e,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==e%2,v.flipBkg),b.parentNode.insertBefore(A,
-b.nextSibling),b=A;a.appendChild(y);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi,c=e.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
-var f="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(" "),g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.position="relative";g.style.textAlign="center";for(var l=[],m=0;m<this.defaultColorSchemes.length;m++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
-"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){t(a)}))})(m);l.push(p);g.appendChild(p)}var t=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(l[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;k(this.defaultColorSchemes[this.format.currentScheme]);l[this.format.currentScheme].style.background=
-"#84d7ff"}),k=mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{for(var d=c.getSelectionCells(),g=0;g<d.length;g++){for(var l=c.getModel().getStyle(d[g]),m=0;m<f.length;m++)l=mxUtils.removeStylename(l,f[m]);var p=c.getModel().isVertex(d[g])?e.initialDefaultVertexStyle:e.initialdefaultEdgeStyle;null!=a?(l=mxUtils.setStyle(l,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,
+function(f){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(f)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,b,e,d,f,g,l){null!=b&&(b=b.split(","),m.push({name:a,values:b,type:e,defVal:d,countProperty:f,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var n=g,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
+a)n=n.nextSibling,t++;else break;var k={type:e,parentRow:g,index:t,isDeletable:!0,defVal:d,countProperty:f},t=p(a,"",k,0==t%2,l);c(a,d,k);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,b,e,c,d,f,g){if(0<d){var l=Array(d);b=null!=b?b.split(","):[];for(var n=0;n<d;n++)l[n]=null!=b[n]?b[n]:null!=c?c:"";m.push({name:a,values:l,type:e,defVal:c,parentRow:f,flipBkg:g,size:d})}return document.createElement("div")}
+function n(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function p(b,e,p,k,m){var x=p.dispName,y=p.type,u=document.createElement("tr");u.className="gePropRow"+(m?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",b);u.setAttribute("data-pValue",e);k=!1;null!=p.index&&(u.setAttribute("data-index",p.index),x=(null!=x?x:"")+"["+p.index+"]",k=!0);var v=document.createElement("td");
+v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));k&&(v.style.textAlign="right");u.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==y)v.appendChild(f(b,e,p));else if("bool"==y||"boolean"==y)v.appendChild(n(b,e,p));else if("enum"==y){var B=p.enumList;for(m=0;m<B.length;m++)if(x=B[m],x.val==e){v.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(t,function(){var f=
+document.createElement("select");d(v,f);for(var g=0;g<B.length;g++){var l=B[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(n)}f.value=e;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);c(b,a,p)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==y?v.appendChild(g(b,e,p.subType,p.subDefVal,p.countProperty,
+u,m)):"staticArr"==y?v.appendChild(l(b,e,p.subType,p.subDefVal,p.size,u,m)):(v.innerHTML=e,mxEvent.addListener(v,"click",mxUtils.bind(t,function(){function f(){var a=g.value,a=0==a.length&&"string"!=y?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(b,a,p)}var g=document.createElement("input");d(v,g,!0);g.value=e;g.className=
+"gePropEditor";"int"!=y&&"float"!=y||p.allowAuto||(g.type="number",g.step="int"==y?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&f()});g.focus();mxEvent.addListener(g,"blur",function(){f()})})));p.isDeletable&&(m=mxUtils.button("-",mxUtils.bind(t,function(a){c(b,"",p,p.index);mxEvent.consume(a)})),m.style.height="16px",m.style.width="25px",m.style["float"]="right",m.className="geColorBtn",
+v.appendChild(m));u.appendChild(v);return u}var t=this,k=this.editorUi.editor.graph,m=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;u.appendChild(v);mxUtils.write(u,mxResources.get("property"));
+x.style.cursor="pointer";var B=function(){var b=y.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],f=d.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||a.removeChild(d)}catch(qa){}}else v.src=Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(x,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;
+B()});x.appendChild(u);u=document.createElement("th");u.className="gePropHeaderCell";u.innerHTML=mxResources.get("value");x.appendChild(u);y.appendChild(x);var A=!1,q=!1,z;for(z in b)if(x=b[z],"function"!=typeof x.isVisible||x.isVisible(e,this)){var D=null!=e.style[z]?mxUtils.htmlEntities(e.style[z]+""):null!=x.getDefaultValue?x.getDefaultValue(e,this):x.defVal;if("separator"==x.type)q=!q;else{if("staticArr"==x.type)x.size=parseInt(e.style[x.sizeProperty]||b[x.sizeProperty].defVal)||0;else if(null!=
+x.dependentProps){for(var C=x.dependentProps,E=[],K=[],u=0;u<C.length;u++){var G=e.style[C[u]];K.push(b[C[u]].subDefVal);E.push(null!=G?G.split(","):[])}x.dependentPropsDefVal=K;x.dependentPropsVals=E}y.appendChild(p(z,D,x,A,q));A=!A}}for(u=0;u<m.length;u++)for(x=m[u],b=x.parentRow,e=0;e<x.values.length;e++)z=p(x.name,x.values[e],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:e,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==e%2,x.flipBkg),b.parentNode.insertBefore(z,
+b.nextSibling),b=z;a.appendChild(y);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi,c=e.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
+var f="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(" "),g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.position="relative";g.style.textAlign="center";for(var l=[],n=0;n<this.defaultColorSchemes.length;n++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
+"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){t(a)}))})(n);l.push(p);g.appendChild(p)}var t=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(l[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;k(this.defaultColorSchemes[this.format.currentScheme]);l[this.format.currentScheme].style.background=
+"#84d7ff"}),k=mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{for(var d=c.getSelectionCells(),g=0;g<d.length;g++){for(var l=c.getModel().getStyle(d[g]),n=0;n<f.length;n++)l=mxUtils.removeStylename(l,f[n]);var p=c.getModel().isVertex(d[g])?e.initialDefaultVertexStyle:e.initialdefaultEdgeStyle;null!=a?(l=mxUtils.setStyle(l,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,
null)),mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||(l=""==a.fill?mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(b)||(l=""==a.stroke?mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),!mxEvent.isAltDown(b)&&c.getModel().isVertex(d[g])&&
(l=mxUtils.setStyle(l,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(l=mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),l=mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),l=mxUtils.setStyle(l,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(d[g])&&(l=mxUtils.setStyle(l,mxConstants.STYLE_FONTCOLOR,
mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(d[g],l)}}finally{c.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage=
"linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=""==a.fill?mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),b.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(e.initialDefaultVertexStyle,
mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var g=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),l=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=g;b.style.border="1px solid "+l}d.appendChild(b)});d.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,
-4)&&mxUtils.br(d),b(a[g])});null==this.format.currentScheme?t("dark"==uiTheme?1:0):t(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?28:8,n=document.createElement("div");n.style.cssText="position:absolute;left:10px;top:8px;bottom:"+m+"px;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(n,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+m+"px;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(n),a.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));b(n);b(v);k(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&&(e=mxUtils.button(mxResources.get("editStyle"),
+4)&&mxUtils.br(d),b(a[g])});null==this.format.currentScheme?t("dark"==uiTheme?1:0):t(this.format.currentScheme);var n=10>=this.defaultColorSchemes.length?28:8,m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:"+n+"px;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(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var x=document.createElement("div");x.style.cssText="position:absolute;left:202px;top:8px;bottom:"+n+"px;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(x));mxEvent.addListener(x,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));b(m);b(x);k(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&&(e=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),e.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),e.style.width="202px",e.style.marginBottom="2px",a.appendChild(e));var c=this.editorUi.editor.graph,d=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.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==e?b.style.width="202px":(e.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==e?b.style.width="202px":(e.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 y=Graph.prototype.init;
@@ -3199,12 +3200,12 @@ Graph.prototype.init=function(){function a(a){b=a;try{if(mxClient.IS_QUIRKS||7==
window.mxFreehand&&(this.freehand=new mxFreehand(this));var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var e=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):e.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);
if(null!=b){if("rack"==b.childLayout){var e=new mxStackLayout(this.graph,!1);e.gridSize=null!=b.rackUnitSize?parseFloat(b.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;e.fill=!0;e.marginLeft=b.marginLeft||0;e.marginRight=b.marginRight||0;e.marginTop=b.marginTop||0;e.marginBottom=b.marginBottom||0;e.allowGaps=b.allowGaps||0;e.resizeParent=!1;return e}if("undefined"!==typeof mxTableLayout&&"tableLayout"==b.childLayout)return e=new mxTableLayout(this.graph),e.rows=b.tableRows||
2,e.columns=b.tableColumns||2,e.colPercentages=b.colPercentages,e.rowPercentages=b.rowPercentages,e.equalColumns="1"==mxUtils.getValue(b,"equalColumns",e.colPercentages?"0":"1"),e.equalRows="1"==mxUtils.getValue(b,"equalRows",e.rowPercentages?"0":"1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.border=b.tableBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.autoAddCol="1"==mxUtils.getValue(b,
-"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return x.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
+"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return v.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=D.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);
-return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,m,p,t,k){var n=null;k||null==this.themes||"darkTheme"!=this.defaultThemeName||(n=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
-this.refresh());var v=A.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var y=v.ownerDocument,x=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?x.setAttributeNS("type","text/css"):x.setAttribute("type","text/css");for(var u="",B="",z=0;z<this.extFonts.length;z++){var q=this.extFonts[z].name,D=this.extFonts[z].url;0==D.indexOf(Editor.GOOGLE_FONTS)?u+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
-q+'";\nsrc: url("'+D+'");\n}\n'}x.appendChild(y.createTextNode(u+B));v.getElementsByTagName("defs")[0].appendChild(x)}null!=n&&(this.stylesheet=n,this.refresh());return v};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=C.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
-mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var z=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){z.apply(this,
+return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,n,p,t,k){var m=null;k||null==this.themes||"darkTheme"!=this.defaultThemeName||(m=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
+this.refresh());var x=z.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var y=x.ownerDocument,u=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?u.setAttributeNS("type","text/css"):u.setAttribute("type","text/css");for(var v="",B="",A=0;A<this.extFonts.length;A++){var q=this.extFonts[A].name,D=this.extFonts[A].url;0==D.indexOf(Editor.GOOGLE_FONTS)?v+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
+q+'";\nsrc: url("'+D+'");\n}\n'}u.appendChild(y.createTextNode(v+B));x.getElementsByTagName("defs")[0].appendChild(u)}null!=m&&(this.stylesheet=m,this.refresh());return x};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=C.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
+mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var E=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){E.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
null!=a.actions)){for(var b=0;b<a.actions.length;b++){var e=a.actions[b];if(null!=e.open)if(this.isCustomLink(e.open)){if(!this.customLinkClicked(e.open))return}else this.openLink(e.open)}this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)e=a.actions[b],null!=e.toggle&&this.toggleCells(this.getCellsForAction(e.toggle,!0)),null!=e.show&&this.setCellsVisible(this.getCellsForAction(e.show,!0),!0),null!=e.hide&&this.setCellsVisible(this.getCellsForAction(e.hide,!0),!1)}finally{this.model.endUpdate()}for(b=
@@ -3212,8 +3213,8 @@ null!=a.actions)){for(var b=0;b<a.actions.length;b++){var e=a.actions[b];if(null
this.getLinkForCell(b);null!=e&&"data:action/json,"==e.substring(0,17)&&this.setLinkForCell(b,this.updateCustomLink(a,e));if(this.isHtmlLabel(b)){var c=document.createElement("div");c.innerHTML=this.sanitizeHtml(this.getLabel(b));for(var d=c.getElementsByTagName("a"),f=!1,g=0;g<d.length;g++)e=d[g].getAttribute("href"),null!=e&&"data:action/json,"==e.substring(0,17)&&(d[g].setAttribute("href",this.updateCustomLink(a,e)),f=!0);f&&this.labelChanged(b,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,
b){if("data:action/json,"==b.substring(0,17))try{var e=JSON.parse(b.substring(17));null!=e.actions&&(this.updateCustomLinkActions(a,e.actions),b="data:action/json,"+JSON.stringify(e))}catch(L){}return b};Graph.prototype.updateCustomLinkActions=function(a,b){for(var e=0;e<b.length;e++){var c=b[e];this.updateCustomLinkAction(a,c.toggle);this.updateCustomLinkAction(a,c.show);this.updateCustomLinkAction(a,c.hide);this.updateCustomLinkAction(a,c.select);this.updateCustomLinkAction(a,c.highlight);this.updateCustomLinkAction(a,
c.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,b){if(null!=b&&null!=b.cells){for(var e=[],c=0;c<b.cells.length;c++)if("*"==b.cells[c])e.push(b.cells[c]);else{var d=a[b.cells[c]];null!=d?""!=d&&e.push(d):e.push(b.cells[c])}b.cells=e}};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,b))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var e=0;e<a.length;e++)if("*"==a[e])var c=this.getDefaultParent(),
-b=b.concat(this.model.filterDescendants(function(a){return a!=c},c));else{var d=this.model.getCell(a[e]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,e,c){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());e=null!=e?e:"tags";for(var f=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=!0,f++);for(l=0;l<b.length;l++)if(c&&this.model.getParent(b[l])==this.model.root||this.model.isVertex(b[l])||this.model.isEdge(b[l])){var m=null!=
-b[l].value&&"object"==typeof b[l].value?mxUtils.trim(b[l].value.getAttribute(e)||""):"",p=!1;if(0<m.length){if(m=m.toLowerCase().split(" "),m.length>=a.length){for(var t=p=0;t<m.length&&p<f;t++)null!=g[m[t]]&&p++;p=p==f}}else p=0==a.length;p&&d.push(b[l])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();
+b=b.concat(this.model.filterDescendants(function(a){return a!=c},c));else{var d=this.model.getCell(a[e]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,e,c){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());e=null!=e?e:"tags";for(var f=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=!0,f++);for(l=0;l<b.length;l++)if(c&&this.model.getParent(b[l])==this.model.root||this.model.isVertex(b[l])||this.model.isEdge(b[l])){var n=null!=
+b[l].value&&"object"==typeof b[l].value?mxUtils.trim(b[l].value.getAttribute(e)||""):"",p=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var t=p=0;t<n.length&&p<f;t++)null!=g[n[t]]&&p++;p=p==f}}else p=0==a.length;p&&d.push(b[l])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();
try{for(var e=0;e<a.length;e++)this.model.setVisible(a[e],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,e,c){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,e,c)};Graph.prototype.highlightCell=function(a,b,e,c){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;e=null!=e?e:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,b,d,!1);null!=c&&(f.opacity=c);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)},e)}};Graph.prototype.addSvgShadow=function(a,b,e){e=null!=e?e:!1;var c=a.ownerDocument,d=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");d.setAttribute("id",this.shadowId);var f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");
f.setAttribute("in","SourceAlpha");f.setAttribute("stdDeviation",this.svgShadowBlur);f.setAttribute("result","blur");d.appendChild(f);f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");f.setAttribute("in","blur");f.setAttribute("dx",this.svgShadowSize);f.setAttribute("dy",this.svgShadowSize);f.setAttribute("result","offsetBlur");d.appendChild(f);f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");
@@ -3231,40 +3232,40 @@ STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people
"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var 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 G=mxMarker.createMarker;mxMarker.createMarker=
-function(a,b,e,c,d,f,g,l,m,p){if(null!=e&&null==mxMarker.markers[e]){var t=this.getPackageForType(e);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){v.value=Math.max(1,Math.min(l,Math.max(parseInt(v.value),parseInt(n.value))));n.value=Math.max(1,Math.min(l,Math.min(parseInt(v.value),parseInt(n.value))))}function c(b){function e(b,e,f){var g=b.useCssTransforms,l=b.currentTranslate,m=b.currentScale,p=b.view.translate,t=
-b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var k=b.getGraphBounds(),n=0,y=0,v=ia.get(),x=1/b.pageScale,q=z.checked;if(q)var x=parseInt(K.value),A=parseInt(R.value),x=Math.min(v.height*A/(k.height/b.view.scale),v.width*x/(k.width/b.view.scale));else x=parseInt(u.value)/(100*b.pageScale),isNaN(x)&&(c=1/b.pageScale,u.value="100 %");v=mxRectangle.fromRectangle(v);v.width=Math.ceil(v.width*
-c);v.height=Math.ceil(v.height*c);x*=c;!q&&b.pageVisible?(k=b.getPageLayout(),n-=k.x*v.width,y-=k.y*v.height):q=!0;if(null==e){e=PrintDialog.createPrintPreview(b,x,v,0,n,y,q);e.pageSelector=!1;e.mathEnabled=!1;n=a.getCurrentFile();null!=n&&(e.title=n.getTitle());var D=e.writeHead;e.writeHead=function(e){D.apply(this,arguments);mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),e.writeln("</style>"));
+function(a,b,e,c,d,f,g,l,n,p){if(null!=e&&null==mxMarker.markers[e]){var t=this.getPackageForType(e);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){x.value=Math.max(1,Math.min(l,Math.max(parseInt(x.value),parseInt(m.value))));m.value=Math.max(1,Math.min(l,Math.min(parseInt(x.value),parseInt(m.value))))}function c(b){function e(b,e,f){var g=b.useCssTransforms,l=b.currentTranslate,n=b.currentScale,p=b.view.translate,t=
+b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var k=b.getGraphBounds(),m=0,y=0,x=ia.get(),v=1/b.pageScale,q=A.checked;if(q)var v=parseInt(K.value),z=parseInt(R.value),v=Math.min(x.height*z/(k.height/b.view.scale),x.width*v/(k.width/b.view.scale));else v=parseInt(u.value)/(100*b.pageScale),isNaN(v)&&(c=1/b.pageScale,u.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*
+c);x.height=Math.ceil(x.height*c);v*=c;!q&&b.pageVisible?(k=b.getPageLayout(),m-=k.x*x.width,y-=k.y*x.height):q=!0;if(null==e){e=PrintDialog.createPrintPreview(b,v,x,0,m,y,q);e.pageSelector=!1;e.mathEnabled=!1;m=a.getCurrentFile();null!=m&&(e.title=m.getTitle());var D=e.writeHead;e.writeHead=function(e){D.apply(this,arguments);mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),e.writeln("</style>"));
null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));if(null!=b.extFonts)for(var c=0;c<b.extFonts.length;c++){var d=b.extFonts[c].name,f=b.extFonts[c].url;0==f.indexOf(Editor.GOOGLE_FONTS)?e.writeln('<link rel="stylesheet" href="'+f+'" charset="UTF-8" type="text/css">'):(e.writeln('<style type="text/css">'),e.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+f+'");\n}'),e.writeln("</style>"))}};if("undefined"!==typeof MathJax){var B=
-e.renderPage;e.renderPage=function(b,e,c,d,f,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var m=B.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}n=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(n=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,f,!0);null!=n&&(d.stylesheet=n,d.refresh())}else{v=
-b.background;if(null==v||""==v||v==mxConstants.NONE)v="#ffffff";e.backgroundColor=v;e.autoOrigin=q;e.appendGraph(b,x,n,y,f,!0);if(null!=b.extFonts&&null!=e.wnd)for(f=0;f<b.extFonts.length;f++)n=b.extFonts[f].name,y=b.extFonts[f].url,0==y.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+y+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+n+'";\n\tsrc: url("'+y+'");\n}'),
-e.wnd.document.writeln("</style>"))}g&&(b.useCssTransforms=g,b.currentTranslate=l,b.currentScale=m,b.view.translate=p,b.view.scale=t);return e}var c=parseInt(ka.value)/100;isNaN(c)&&(c=1,ka.value="100 %");var c=.75*c,f=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(f=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=n.value,l=v.value,p=!t.checked,k=null;p&&(p=g==m&&l==m);if(!p&&null!=a.pages&&a.pages.length){var y=0,p=a.pages.length-1;t.checked||(y=parseInt(g)-1,p=parseInt(l)-
-1);for(var x=y;x<=p;x++){var q=a.pages[x],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,y=!1,A=null,D=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,y=q.viewState.mathEnabled,A=q.viewState.background,D=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);g.background=A;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=l;g.mathEnabled=y;var B=g.getGlobalVariable;g.getGlobalVariable=
-function(b){return"page"==b?q.getName():"pagenumber"==b?x+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}k=e(g,k,x!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else k=e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,b&&(k.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
-k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k));null!=f&&(d.stylesheet=f,d.refresh())}var d=a.editor.graph,f=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,b||mxResources.get("print"));f.appendChild(g);var l=1,m=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText=
-"margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));p.appendChild(g);mxUtils.br(p);var k=t.cloneNode(!0);t.setAttribute("checked","checked");k.setAttribute("value","range");p.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");p.appendChild(g);var n=document.createElement("input");
-n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.style.width="50px";p.appendChild(n);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var v=n.cloneNode(!0);p.appendChild(v);mxEvent.addListener(n,"focus",function(){k.checked=!0});mxEvent.addListener(v,"focus",function(){k.checked=!0});mxEvent.addListener(n,"change",e);mxEvent.addListener(v,"change",e);if(null!=a.pages&&(l=a.pages.length,
-null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){m=g+1;n.value=m;v.value=m;break}n.setAttribute("max",l);v.setAttribute("max",l);a.isPagesEnabled()?1<l&&(f.appendChild(p),k.checked=!0):k.checked=!0;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);g=document.createElement("span");
-mxUtils.write(g,mxResources.get("adjustTo"));y.appendChild(g);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","100 %");u.style.width="50px";y.appendChild(u);mxEvent.addListener(u,"focus",function(){x.checked=!0});f.appendChild(y);var p=p.cloneNode(!1),z=x.cloneNode(!0);z.setAttribute("value","fit");x.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
-g.appendChild(z);p.appendChild(g);y=document.createElement("table");y.style.display="inline-block";var q=document.createElement("tbody"),A=document.createElement("tr"),D=A.cloneNode(!0),C=document.createElement("td"),E=C.cloneNode(!0),G=C.cloneNode(!0),F=C.cloneNode(!0),J=C.cloneNode(!0),I=C.cloneNode(!0);C.style.textAlign="right";F.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
-K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";E.appendChild(K);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));G.appendChild(g);mxUtils.write(F,mxResources.get("fitToBy"));var R=K.cloneNode(!0);J.appendChild(R);mxEvent.addListener(K,"focus",function(){z.checked=!0});mxEvent.addListener(R,"focus",function(){z.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));I.appendChild(g);A.appendChild(C);
-A.appendChild(E);A.appendChild(G);D.appendChild(F);D.appendChild(J);D.appendChild(I);q.appendChild(A);q.appendChild(D);y.appendChild(q);p.appendChild(y);f.appendChild(p);p=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));p.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ia=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
+e.renderPage;e.renderPage=function(b,e,c,d,f,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=B.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}m=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(m=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,f,!0);null!=m&&(d.stylesheet=m,d.refresh())}else{x=
+b.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";e.backgroundColor=x;e.autoOrigin=q;e.appendGraph(b,v,m,y,f,!0);if(null!=b.extFonts&&null!=e.wnd)for(f=0;f<b.extFonts.length;f++)m=b.extFonts[f].name,y=b.extFonts[f].url,0==y.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+y+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+m+'";\n\tsrc: url("'+y+'");\n}'),
+e.wnd.document.writeln("</style>"))}g&&(b.useCssTransforms=g,b.currentTranslate=l,b.currentScale=n,b.view.translate=p,b.view.scale=t);return e}var c=parseInt(ka.value)/100;isNaN(c)&&(c=1,ka.value="100 %");var c=.75*c,f=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(f=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=m.value,l=x.value,p=!t.checked,k=null;p&&(p=g==n&&l==n);if(!p&&null!=a.pages&&a.pages.length){var y=0,p=a.pages.length-1;t.checked||(y=parseInt(g)-1,p=parseInt(l)-
+1);for(var v=y;v<=p;v++){var q=a.pages[v],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,y=!1,z=null,D=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,y=q.viewState.mathEnabled,z=q.viewState.background,D=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);g.background=z;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=l;g.mathEnabled=y;var B=g.getGlobalVariable;g.getGlobalVariable=
+function(b){return"page"==b?q.getName():"pagenumber"==b?v+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}k=e(g,k,v!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else k=e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,b&&(k.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
+k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k));null!=f&&(d.stylesheet=f,d.refresh())}var d=a.editor.graph,f=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,b||mxResources.get("print"));f.appendChild(g);var l=1,n=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText=
+"margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));p.appendChild(g);mxUtils.br(p);var k=t.cloneNode(!0);t.setAttribute("checked","checked");k.setAttribute("value","range");p.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");p.appendChild(g);var m=document.createElement("input");
+m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";p.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var x=m.cloneNode(!0);p.appendChild(x);mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(x,"focus",function(){k.checked=!0});mxEvent.addListener(m,"change",e);mxEvent.addListener(x,"change",e);if(null!=a.pages&&(l=a.pages.length,
+null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;m.value=n;x.value=n;break}m.setAttribute("max",l);x.setAttribute("max",l);a.isPagesEnabled()?1<l&&(f.appendChild(p),k.checked=!0):k.checked=!0;var y=document.createElement("div");y.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");y.appendChild(v);g=document.createElement("span");
+mxUtils.write(g,mxResources.get("adjustTo"));y.appendChild(g);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","100 %");u.style.width="50px";y.appendChild(u);mxEvent.addListener(u,"focus",function(){v.checked=!0});f.appendChild(y);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+g.appendChild(A);p.appendChild(g);y=document.createElement("table");y.style.display="inline-block";var q=document.createElement("tbody"),z=document.createElement("tr"),D=z.cloneNode(!0),C=document.createElement("td"),E=C.cloneNode(!0),G=C.cloneNode(!0),F=C.cloneNode(!0),I=C.cloneNode(!0),J=C.cloneNode(!0);C.style.textAlign="right";F.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
+K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";E.appendChild(K);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));G.appendChild(g);mxUtils.write(F,mxResources.get("fitToBy"));var R=K.cloneNode(!0);I.appendChild(R);mxEvent.addListener(K,"focus",function(){A.checked=!0});mxEvent.addListener(R,"focus",function(){A.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));J.appendChild(g);z.appendChild(C);
+z.appendChild(E);z.appendChild(G);D.appendChild(F);D.appendChild(I);D.appendChild(J);q.appendChild(z);q.appendChild(D);y.appendChild(q);p.appendChild(y);f.appendChild(p);p=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));p.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ia=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
p.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));p.appendChild(g);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";p.appendChild(ka);f.appendChild(p);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&g.appendChild(p);a.isOffline()||
(y=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),y.className="geBtn",g.appendChild(y));PrintDialog.previewEnabled&&(y=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),y.className="geBtn",g.appendChild(y));y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});y.className="geBtn gePrimaryBtn";g.appendChild(y);a.editor.cancelFirst||g.appendChild(p);
f.appendChild(g);this.container=f};var F=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=
this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(F.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var I=document.createElement("canvas"),
J=new Image;J.onload=function(){try{I.getContext("2d").drawImage(J,0,0);var a=I.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};J.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){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
-"\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
-!EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,
-topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,e,c,d,f,l,k){l=null!=l?l:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==e||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
-null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=b+"/log?severity="+l+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(y){}try{k||null==window.console||
-console.error(l,a,e,c,d,f)}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,a.length>
-e&&(a=a.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],e=0;e<arguments.length;e++)null!=arguments[e]&&a.push(arguments[e]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,e,c){function b(a,b){var e=f;f+=b;return a.substring(e,
-f)}function d(a){a=b(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(b(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(b(a,4),"IHDR"!=b(a,4))null!=c&&c();else{b(a,17);do{c=d(a);var g=b(a,4);if(null!=e&&e(f-8,g,c))break;value=b(a,c);b(a,4);if("IEND"==g)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
-EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
+EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
+EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&!EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},
+gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,e,c,d,f,l,k){l=null!=l?l:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==e||-1==a.indexOf("Script error")&&
+-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=b+"/log?severity="+l+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(y){}try{k||
+null==window.console||console.error(l,a,e,c,d,f)}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{e=
+null!=e?e:5E4,a.length>e&&(a=a.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],e=0;e<arguments.length;e++)null!=arguments[e]&&a.push(arguments[e]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,e,c){function b(a,b){var e=
+f;f+=b;return a.substring(e,f)}function d(a){a=b(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(b(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(b(a,4),"IHDR"!=b(a,4))null!=c&&c();else{b(a,17);do{c=d(a);var g=b(a,4);if(null!=e&&e(f-8,g,c))break;value=b(a,c);b(a,4);if("IEND"==g)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml=
+'<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var e=document.createElement("canvas"),c=new Image;c.onload=function(){try{e.getContext("2d").drawImage(c,0,0);var a=e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(l){}};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(m){}try{e=
-document.createElement("canvas");e.width=e.height=1;var d=e.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(a,e,c){return this.editor.graph.openLink(a,e,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,e){e(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,e,c){localStorage.setItem(a,e);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,e){localStorage.removeItem(a);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(n){}try{var e=document.createElement("canvas"),c=new Image;c.onload=function(){try{e.getContext("2d").drawImage(c,0,0);var a=e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(l){}};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(n){}try{e=
+document.createElement("canvas");e.width=e.height=1;var d=e.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(a,e,c){return this.editor.graph.openLink(a,e,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,e){e(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,e,c){localStorage.setItem(a,e);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,e){localStorage.removeItem(a);
e()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
function(a,e,c){c=null!=c?c:24;var b=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=b.spin;b.spin=function(c,f){var g=!1;this.active||(d.call(this,c),this.active=!0,null!=f&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize=
"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,e+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"),"..."!=f.substring(f.length-3,f.length)&&"!"!=f.charAt(f.length-1)&&(f+="..."),g.innerHTML=f,c.appendChild(g),b.status=g,mxClient.IS_VML&&
@@ -3272,14 +3273,14 @@ function(a,e,c){c=null!=c?c:24;var b=new Spinner({lines:12,length:c,width:Math.r
b.pause=function(){return function(){}};return b};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(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=a.apply(this,arguments);if(null==e)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,
-">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),l=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=l?mxUtils.getXml(l):""}catch(v){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
+">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),l=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=l?mxUtils.getXml(l):""}catch(x){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var l=this.updatePageRoot(new DiagramPage(d[f]));
null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[f+1]));b.model.execute(new ChangePage(this,l,0==f?l:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=
-this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,e,c,d,f,l,k,t,n,x,q){e=null!=e?e:this.editor.graph;f=null!=f?f:!1;n=null!=n?n:!0;var b,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?b="_blank":g=b=d;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",
-Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));m=Graph.compress(p);if(Graph.decompress(m)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,m)}m=a.ownerDocument.createElement("mxfile");m.appendChild(p)}x?(m=m.cloneNode(!0),m.removeAttribute("modified"),m.removeAttribute("host"),m.removeAttribute("agent"),m.removeAttribute("etag"),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),
-m.removeAttribute("type")):(m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("pages"),m.removeAttribute("type"),mxClient.IS_CHROMEAPP?m.setAttribute("host","Chrome"):EditorUi.isElectronApp?m.setAttribute("host","Electron"):m.setAttribute("host",window.location.hostname),m.setAttribute("modified",(new Date).toISOString()),m.setAttribute("agent",navigator.appVersion),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("etag",Editor.guid()),
-a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!l&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))q=this.getHtml2(mxUtils.getXml(m),e,null!=c?c.getTitle():null,b,g);else if(l||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),q=this.getEmbeddedSvg(q,e,
-d,null,t,n,g);return q};EditorUi.prototype.getXmlFileData=function(a,e,c){a=null!=a?a:!0;e=null!=e?e:!1;c=null!=c?c:!Editor.compressXml;var b=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var e=a.getElementsByTagName("mxGraphModel"),e=0<e.length?e[0]:null;null==e&&c?(e=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<e.length&&(e=Graph.decompress(e),null!=e&&0<e.length&&a.appendChild(mxUtils.parseXml(e).documentElement))):null==e||c?a=a.cloneNode(!0):
+this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,e,c,d,f,l,k,t,m,v,q){e=null!=e?e:this.editor.graph;f=null!=f?f:!1;m=null!=m?m:!0;var b,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?b="_blank":g=b=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",
+Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));n=Graph.compress(p);if(Graph.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,n)}n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}v?(n=n.cloneNode(!0),n.removeAttribute("modified"),n.removeAttribute("host"),n.removeAttribute("agent"),n.removeAttribute("etag"),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),
+n.removeAttribute("type")):(n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("pages"),n.removeAttribute("type"),mxClient.IS_CHROMEAPP?n.setAttribute("host","Chrome"):EditorUi.isElectronApp?n.setAttribute("host","Electron"):n.setAttribute("host",window.location.hostname),n.setAttribute("modified",(new Date).toISOString()),n.setAttribute("agent",navigator.appVersion),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("etag",Editor.guid()),
+a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a),1<n.getElementsByTagName("diagram").length&&null!=this.pages&&n.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(n):mxUtils.getXml(n);if(!l&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))q=this.getHtml2(mxUtils.getXml(n),e,null!=c?c.getTitle():null,b,g);else if(l||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),q=this.getEmbeddedSvg(q,e,
+d,null,t,m,g);return q};EditorUi.prototype.getXmlFileData=function(a,e,c){a=null!=a?a:!0;e=null!=e?e:!1;c=null!=c?c:!Editor.compressXml;var b=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var e=a.getElementsByTagName("mxGraphModel"),e=0<e.length?e[0]:null;null==e&&c?(e=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<e.length&&(e=Graph.decompress(e),null!=e&&0<e.length&&a.appendChild(mxUtils.parseXml(e).documentElement))):null==e||c?a=a.cloneNode(!0):
(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(e)));b.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(b)),b=this.fileNode.cloneNode(!1),e)a(this.currentPage.node);else for(e=0;e<this.pages.length;e++){if(this.currentPage!=this.pages[e]&&this.pages[e].needsUpdate){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[e].root));this.editor.graph.saveViewState(this.pages[e].viewState,
d);EditorUi.removeChildNodes(this.pages[e].node);mxUtils.setTextContent(this.pages[e].node,Graph.compressNode(d));delete this.pages[e].needsUpdate}a(this.pages[e].node)}return b};EditorUi.prototype.anonymizeString=function(a,e){for(var b=[],c=0;c<a.length;c++){var d=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?b.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?b.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?b.push(String.fromCharCode(97+Math.round(25*Math.random()))):
/\s/.test(d)?b.push(" "):b.push("?"):b.push(e?"0":Math.round(9*Math.random()))}return b.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(l){a[EditorUi.DIFF_INSERT][b].data=
@@ -3287,9 +3288,9 @@ l.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]
delete f.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,e){if(null!=a.attributes)for(var b=0;b<a.attributes.length;b++)"as"!=a.attributes[b].name&&a.setAttribute(a.attributes[b].name,this.anonymizeString(a.attributes[b].value,e));if(null!=a.childNodes)for(b=
0;b<a.childNodes.length;b++)this.anonymizeAttributes(a.childNodes[b],e)};EditorUi.prototype.anonymizeNode=function(a,e){for(var b=a.getElementsByTagName("mxCell"),c=0;c<b.length;c++)null!=b[c].getAttribute("value")&&b[c].setAttribute("value","["+b[c].getAttribute("value").length+"]"),null!=b[c].getAttribute("xmlValue")&&b[c].setAttribute("xmlValue","["+b[c].getAttribute("xmlValue").length+"]"),null!=b[c].getAttribute("style")&&b[c].setAttribute("style","["+b[c].getAttribute("style").length+"]"),null!=
b[c].parentNode&&"root"!=b[c].parentNode.nodeName&&null!=b[c].parentNode.parentNode&&(b[c].setAttribute("id",b[c].parentNode.getAttribute("id")),b[c].parentNode.parentNode.replaceChild(b[c],b[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),
-this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,e,c,d,f,l,k,t,n,x){f=null!=f?f:!0;l=null!=l?l:!1;var b=this.editor.graph;if(e||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))if(x=
-!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=b.getGlobalVariable,b=this.createTemporaryGraph(b.getStylesheet()),m=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(m.root)}k=null!=k?k:this.getXmlFileData(f,l,x);n=null!=n?n:this.getCurrentFile();a=this.createFileData(k,b,n,window.location.href,a,e,c,d,f,t,x);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);
-return a};EditorUi.prototype.getHtml=function(a,e,c,d,f,l){l=null!=l?l:!0;var b=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){var b=l?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells()),m=e.view.scale;l=Math.floor(b.x/m-e.view.translate.x);m=Math.floor(b.y/m-e.view.translate.y);b=e.background;null==f&&(e=this.getBasenames().join(";"),0<e.length&&(g=EditorUi.drawHost+"/embed.js?s="+e));a.setAttribute("x0",l);a.setAttribute("y0",m)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,e,c,d,f,l,k,t,m,v){f=null!=f?f:!0;l=null!=l?l:!1;var b=this.editor.graph;if(e||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))if(v=
+!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=b.getGlobalVariable,b=this.createTemporaryGraph(b.getStylesheet()),n=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(n.root)}k=null!=k?k:this.getXmlFileData(f,l,v);m=null!=m?m:this.getCurrentFile();a=this.createFileData(k,b,m,window.location.href,a,e,c,d,f,t,v);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);
+return a};EditorUi.prototype.getHtml=function(a,e,c,d,f,l){l=null!=l?l:!0;var b=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){var b=l?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells()),n=e.view.scale;l=Math.floor(b.x/n-e.view.translate.x);n=Math.floor(b.y/n-e.view.translate.y);b=e.background;null==f&&(e=this.getBasenames().join(";"),0<e.length&&(g=EditorUi.drawHost+"/embed.js?s="+e));a.setAttribute("x0",l);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!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=b&&b!=mxConstants.NONE?' style="background-color:'+b+';">':">")+'\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==f?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,e,c,d,f){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=f&&(f=f.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));
@@ -3298,26 +3299,26 @@ mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==f?'<script type="tex
null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(mxResources.get("notADiagramFile")+" ("+b+")");b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var c=null;this.fileNode=a;this.pages=[];for(var d=0;d<b.length;d++)null==b[d].getAttribute("id")&&b[d].setAttribute("id",d),a=new DiagramPage(b[d]),
null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(c=a);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var l=this.editor.graph.getModel(),k=l.getChildren(l.root),d=0;d<k.length;d++){var t=k[d];l.setVisible(t,a[t.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,e,c,d,f,l,k,t,n,x,q){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var b=this.getBaseFilename(!f),
-g=b+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,e);this.saveData(g,a,m,"text/xml")}else if("html"==a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,b),this.saveData(g,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=b+".png":"jpeg"==a&&(g=b+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,e){try{var c=this.editor.graph.pageVisible;
-null!=l&&(this.editor.graph.pageVisible=l);var g=this.createDownloadRequest(b,a,d,e,k,f,t,n,x,q);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var p=null,y=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(p)}))});if("svg"==a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=
-null;var D=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=b+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();y(a)}),d)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=
-function(a,e,c,d,f,l,k,t,n,x){var b=this.editor.graph,g=b.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=e);var m="",p="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==e&&0==l&&(p="&allPages=1");if("xmlpng"==e&&(x="1",e="png",null!=this.pages&&null!=this.currentPage))for(l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){m="&from="+l;break}l=b.background;"png"!=e&&"pdf"!=e||!f?f||
-null!=l&&l!=mxConstants.NONE||(l="#ffffff"):l=mxConstants.NONE;f={globalVars:b.getExportVariables()};n&&(f.grid={size:b.gridSize,steps:b.view.gridSteps,color:b.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+e+m+p+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+d+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=k?"&scale="+k:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,
+this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,e,c,d,f,l,k,t,m,v,q){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var b=this.getBaseFilename(!f),
+g=b+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,e);this.saveData(g,a,n,"text/xml")}else if("html"==a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,b),this.saveData(g,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=b+".png":"jpeg"==a&&(g=b+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,e){try{var c=this.editor.graph.pageVisible;
+null!=l&&(this.editor.graph.pageVisible=l);var g=this.createDownloadRequest(b,a,d,e,k,f,t,m,v,q);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var p=null,y=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(p)}))});if("svg"==a){var x=this.editor.graph.background;if(k||x==mxConstants.NONE)x=
+null;var D=this.editor.graph.getSvg(x,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=b+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();y(a)}),d)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=
+function(a,e,c,d,f,l,k,t,m,v){var b=this.editor.graph,g=b.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=e);var n="",p="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};v=v?"1":"0";"pdf"==e&&0==l&&(p="&allPages=1");if("xmlpng"==e&&(v="1",e="png",null!=this.pages&&null!=this.currentPage))for(l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){n="&from="+l;break}l=b.background;"png"!=e&&"pdf"!=e||!f?f||
+null!=l&&l!=mxConstants.NONE||(l="#ffffff"):l=mxConstants.NONE;f={globalVars:b.getExportVariables()};m&&(f.grid={size:b.gridSize,steps:b.view.gridSteps,color:b.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+e+n+p+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+d+"&embedXml="+v+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=k?"&scale="+k:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,
e){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,e,c){var b=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,g=null,l=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()),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(l,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();l()}));m();l()}null!=e&&e()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&!this.editor.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.editor.loadUrl(f,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=
-new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,l=f.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=l.getCell(a.getAttribute("id"));if(null!=t){try{var n=a.getAttribute("value");if(null!=n){var x=
-mxUtils.parseXml(n).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))l.setValue(t,x);else for(var q=x.attributes,A=0;A<q.length;A++)f.setAttributeForCell(t,q[A].nodeName,0<q[A].nodeValue.length?q[A].nodeValue:null)}}catch(u){null!=window.console&&console.log("Error in value for "+t.id+": "+u)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(t,C)}catch(u){null!=window.console&&console.log("Error in style for "+t.id+": "+u)}try{var z=a.getAttribute("icon");if(null!=z){var E=
-0<z.length?JSON.parse(z):null;null!=E&&E.append||f.removeCellOverlays(t);null!=E&&f.addCellOverlay(t,b(E))}}catch(u){null!=window.console&&console.log("Error in icon for "+t.id+": "+u)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),F=f.getCellGeometry(t);if(null!=F){F=F.clone();for(key in G){var I=parseFloat(G[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(G[key])}f.model.setGeometry(t,F)}}}catch(u){null!=window.console&&
+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,g=null,l=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()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
+n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=e&&e()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&!this.editor.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.editor.loadUrl(f,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=
+new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,l=f.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=l.getCell(a.getAttribute("id"));if(null!=t){try{var m=a.getAttribute("value");if(null!=m){var v=
+mxUtils.parseXml(m).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))l.setValue(t,v);else for(var q=v.attributes,z=0;z<q.length;z++)f.setAttributeForCell(t,q[z].nodeName,0<q[z].nodeValue.length?q[z].nodeValue:null)}}catch(u){null!=window.console&&console.log("Error in value for "+t.id+": "+u)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(t,C)}catch(u){null!=window.console&&console.log("Error in style for "+t.id+": "+u)}try{var A=a.getAttribute("icon");if(null!=A){var E=
+0<A.length?JSON.parse(A):null;null!=E&&E.append||f.removeCellOverlays(t);null!=E&&f.addCellOverlay(t,b(E))}}catch(u){null!=window.console&&console.log("Error in icon for "+t.id+": "+u)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),F=f.getCellGeometry(t);if(null!=F){F=F.clone();for(key in G){var I=parseFloat(G[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(G[key])}f.model.setGeometry(t,F)}}}catch(u){null!=window.console&&
console.log("Error in icon for "+t.id+": "+u)}}}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,l)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
-parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return c};EditorUi.prototype.getCopyFilename=function(a,e){var b=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=b.lastIndexOf(".");0<=d&&(c=b.substring(d),b=b.substring(0,d));if(e)var f=new Date,d=f.getFullYear(),k=f.getMonth()+1,t=f.getDate(),n=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),b=b+(" "+(d+"-"+k+"-"+t+"-"+n+"-"+x+"-"+f));
+parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return c};EditorUi.prototype.getCopyFilename=function(a,e){var b=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=b.lastIndexOf(".");0<=d&&(c=b.substring(d),b=b.substring(0,d));if(e)var f=new Date,d=f.getFullYear(),k=f.getMonth()+1,t=f.getDate(),m=f.getHours(),v=f.getMinutes(),f=f.getSeconds(),b=b+(" "+(d+"-"+k+"-"+t+"-"+m+"-"+v+"-"+f));
return b=mxResources.get("copyOf",[b])+c};EditorUi.prototype.fileLoaded=function(a,e){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=b&&(EditorUi.debug("File.closed",[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);!e&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()});e?f():this.handleError(v,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,e){var b=0,c=new mxGraphModel,d=new mxCodec;null!=e&&(e.byteCount=
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()});e?f():this.handleError(x,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,e){var b=0,c=new mxGraphModel,d=new mxCodec;null!=e&&(e.byteCount=
0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var k=a[f].node.cloneNode(!1);k.removeAttribute("name");c.root=a[f].root;var t=d.encode(c);this.editor.graph.saveViewState(a[f].viewState,t,!0);t.removeAttribute("pageWidth");t.removeAttribute("pageHeight");k.appendChild(t);null!=e&&(e.eltCount+=k.getElementsByTagName("*").length,e.nodeCount+=k.getElementsByTagName("mxCell").length);b=(b<<5)-b+this.hashValue(k,function(a,b,e,c){return!c||"mxGeometry"!=
a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?c&&"mxCell"==a.nodeName&&"previous"==b?null:e:Math.round(e)},e)<<0}return b};EditorUi.prototype.hashValue=function(a,e,c){var b=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(b^=this.hashValue(a.nodeName,e,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var f=a.attributes[d].name,
g=null!=e?e(a,f,a.attributes[d].value,!0):a.attributes[d].value;null!=g&&(b^=this.hashValue(f,e,c)+this.hashValue(g,e,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)b=(b<<5)-b+this.hashValue(a.childNodes[d],e,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);e=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)e=(e<<5)-e+a.charCodeAt(d)<<0;b^=e}return b};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
@@ -3326,325 +3327,326 @@ c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.app
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,e){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"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,e,c,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var b=this.sidebar.palettes[a.getHash()],b=null!=b?b[b.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=
null,g=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);c=null!=c&&0<c.length?c:a.getTitle();var p=this.sidebar.addPalette(a.getHash(),c,null!=d?d:!0,mxUtils.bind(this,function(a){g(e,a)}));this.repositionLibrary(b);var k=p.parentNode.previousSibling;d=k.getAttribute("title");
-null!=d&&0<d.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");k.style.position="relative";var q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get("close"));q.setAttribute("valign","absmiddle");
-q.setAttribute("border","0");q.style.cursor="pointer";q.style.margin="0 3px";var A=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var C=this.editor.graph,z=null,
-E=mxUtils.bind(this,function(b){this.showLibraryDialog(a.getTitle(),p,e,a,a.getMode());mxEvent.consume(b)}),G=mxUtils.bind(this,function(b){a.setModified(!0);a.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=q.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="2px",z.style.marginTop="-2px",n.insertBefore(z,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),
-e,a,a.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),k.style.paddingRight=18*n.childNodes.length+"px")})):null==A&&(A=q.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),n.insertBefore(A,n.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(b){this.saveLibrary(a.getTitle(),e,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==A||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+
-"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(b)})),k.style.paddingRight=18*n.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,b,c,d){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=C.getCellGeometry(a[g]);null!=l&&l.translate(-b.x,-b.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,b.width,b.height,d||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:b.width,h:b.height};null!=d&&
+null!=d&&0<d.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");k.style.position="relative";var q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get("close"));q.setAttribute("valign","absmiddle");
+q.setAttribute("border","0");q.style.cursor="pointer";q.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var C=this.editor.graph,A=null,
+E=mxUtils.bind(this,function(b){this.showLibraryDialog(a.getTitle(),p,e,a,a.getMode());mxEvent.consume(b)}),G=mxUtils.bind(this,function(b){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=q.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",m.insertBefore(A,m.firstChild),k.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),
+e,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),k.style.paddingRight=18*m.childNodes.length+"px")})):null==z&&(z=q.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),m.insertBefore(z,m.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(b){this.saveLibrary(a.getTitle(),e,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(k.style.paddingRight=18*m.childNodes.length+
+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(b)})),k.style.paddingRight=18*m.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,b,c,d){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=C.getCellGeometry(a[g]);null!=l&&l.translate(-b.x,-b.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,b.width,b.height,d||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:b.width,h:b.height};null!=d&&
(a.title=d);e.push(a);G(c);null!=f&&null!=f.parentNode&&0<e.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(C.isSelectionEmpty())C.getRubberband().isActive()?(C.getRubberband().execute(a),C.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=C.getSelectionCells(),c=C.view.getBounds(b),e=C.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=C.view.translate.x;c.y-=C.view.translate.y;
F(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,function(){},mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(p.style.backgroundColor=
"",p.style.cursor="default",this.sidebar.showTooltips=!0,C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=!1,C.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,
-function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(b,c,d,l,m,k,t,n,y){if(null!=b&&"image/"==c.substring(0,6))b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(b),b=[new mxCell("",new mxGeometry(0,0,m,k),b)],b[0].vertex=!0,F(b,new mxRectangle(0,0,m,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<e.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,x=mxUtils.bind(this,function(b,c){if(null!=b&&"application/pdf"==c){var d=Editor.extractGraphModelFromPdf(b);null!=d&&0<d.length&&(b=d)}if(null!=b)if(d=mxUtils.parseXml(b),"mxlibrary"==d.documentElement.nodeName)try{var l=
-JSON.parse(mxUtils.getTextContent(d.documentElement));g(l,p);e=e.concat(l);G(a);this.spinner.stop();v=!0}catch(M){}else if("mxfile"==d.documentElement.nodeName)try{for(var m=d.documentElement.getElementsByTagName("diagram"),l=0;l<m.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(m[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,t.width,t.height),a)}v=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<e.length&&(f.parentNode.removeChild(f),f=null)});null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(y,function(a){x(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(b,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));n.insertBefore(q,n.firstChild);mxEvent.addListener(q,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
-p&&E(a)});d=q.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));n.insertBefore(d,n.firstChild);mxEvent.addListener(d,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(a)})),n.insertBefore(d,n.firstChild))}k.appendChild(n);k.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,c){for(var b=0;b<a.length;b++){var e=a[b],d=e.data;if(null!=d){var d=this.convertDataUri(d),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+d,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(d=this.stringToCells(Graph.decompress(e.xml)),
+function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(b,c,d,l,n,k,t,m,y){if(null!=b&&"image/"==c.substring(0,6))b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(b),b=[new mxCell("",new mxGeometry(0,0,n,k),b)],b[0].vertex=!0,F(b,new mxRectangle(0,0,n,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<e.length&&(f.parentNode.removeChild(f),f=null);else{var x=!1,v=mxUtils.bind(this,function(b,c){if(null!=b&&"application/pdf"==c){var d=Editor.extractGraphModelFromPdf(b);null!=d&&0<d.length&&(b=d)}if(null!=b)if(d=mxUtils.parseXml(b),"mxlibrary"==d.documentElement.nodeName)try{var l=
+JSON.parse(mxUtils.getTextContent(d.documentElement));g(l,p);e=e.concat(l);G(a);this.spinner.stop();x=!0}catch(M){}else if("mxfile"==d.documentElement.nodeName)try{for(var n=d.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(n[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,t.width,t.height),a)}x=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<e.length&&(f.parentNode.removeChild(f),f=null)});null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(y,function(a){v(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)&&null!=y?this.parseFile(y,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(b,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));m.insertBefore(q,m.firstChild);mxEvent.addListener(q,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
+p&&E(a)});d=q.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));m.insertBefore(d,m.firstChild);mxEvent.addListener(d,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(a)})),m.insertBefore(d,m.firstChild))}k.appendChild(m);k.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,c){for(var b=0;b<a.length;b++){var e=a[b],d=e.data;if(null!=d){var d=this.convertDataUri(d),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+d,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(d=this.stringToCells(Graph.decompress(e.xml)),
0<d.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(d,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
-Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,c,d,f,m){a=new ImageDialog(this,a,c,d,f,m);this.showDialog(a.container,Graph.fileSupport?
-480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,c){a=null!=a?a:mxUtils.bind(this,function(a,b){if(!b){var c=new ChangePageSetup(this,null,a);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var b=new BackgroundImageDialog(this,a,c);this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,c,d,f,m){a=new LibraryDialog(this,a,c,d,f,m);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
+Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,c,d,f,n){a=new ImageDialog(this,a,c,d,f,n);this.showDialog(a.container,Graph.fileSupport?
+480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,c){a=null!=a?a:mxUtils.bind(this,function(a,b){if(!b){var c=new ChangePageSetup(this,null,a);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var b=new BackgroundImageDialog(this,a,c);this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,c,d,f,n){a=new LibraryDialog(this,a,c,d,f,n);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var c=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=c.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow=
"hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));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,d,f,m,l,k){var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(z){}if(null!=e||null!=c){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),
-p=null;c=null!=c?c:mxResources.get("error");if(null!=e){null!=e.retry&&(g=mxResources.get("cancel"),p=function(){b();e.retry()});if(404==e.code||404==e.status||403==e.code){k=403==e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var n=null!=l?l:window.location.hash;
-if(null!=n&&("#G"==n.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==n.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==e.code||404==e.status)){n="#U"==n.substring(0,2)?n.substring(45,n.lastIndexOf("%26ex")):n.substring(2);this.showError(c,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+
-n);this.handleError(a,c,d,f,m)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;d.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");d.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=b.length;
+a.appendChild(c);return a};EditorUi.prototype.handleError=function(a,c,d,f,n,l,k){var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(A){}if(null!=e||null!=c){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),
+p=null;c=null!=c?c:mxResources.get("error");if(null!=e){null!=e.retry&&(g=mxResources.get("cancel"),p=function(){b();e.retry()});if(404==e.code||404==e.status||403==e.code){k=403==e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var m=null!=l?l:window.location.hash;
+if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==e.code||404==e.status)){m="#U"==m.substring(0,2)?m.substring(45,m.lastIndexOf("%26ex")):m.substring(2);this.showError(c,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+
+m);this.handleError(a,c,d,f,n)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;d.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");d.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=b.length;
d.appendChild(c)}var b=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var d=document.createElement("select");d.style.width="200px";a();mxEvent.addListener(d,"change",mxUtils.bind(this,function(){var c=d.value,e=b.length!=c;e&&this.drive.setUser(b[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
!0)}));c.appendChild(d);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=e.message?k=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?k=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):
-e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=l=null;null!=e&&null!=e.helpLink&&(l=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(c,k,g,d,p,null,null,l,v,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,c,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),c);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,c,d,f,
-m,l){var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){b();null!=c&&c()},function(){b();null!=d&&d()},f,m,null,null,null,null,e);this.showDialog(a.container,340,46+e,!0,l);a.init()};EditorUi.prototype.showBanner=function(a,c,d){var b=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
+e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var x=l=null;null!=e&&null!=e.helpLink&&(l=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(c,k,g,d,p,null,null,l,x,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,c,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),c);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,c,d,f,
+n,l){var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){b();null!=c&&c()},function(){b();null!=d&&d()},f,n,null,null,null,null,e);this.showDialog(a.container,340,46+e,!0,l);a.init()};EditorUi.prototype.showBanner=function(a,c,d){var b=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";b=document.createElement("img");b.setAttribute("src",IMAGE_PATH+
"/logo.png");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(b);b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.setAttribute("border","0");b.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(b);mxUtils.write(e,c);document.body.appendChild(e);
this.bannerShowing=!0;var f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";f.appendChild(g);c=document.createElement("label");c.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(c,mxResources.get("doNotShowAgain"));f.appendChild(c);e.style.paddingBottom="30px";e.appendChild(f);var k=mxUtils.bind(this,
-function(){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(e,"click",
-mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);b!=g&&b!=c?(d(),k(),mxEvent.consume(a)):n()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);b=!0}return b};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};
-EditorUi.prototype.createImageDataUri=function(a,c,d,f){var b=a.toDataURL("image/"+d);if(6>=b.length||b==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c)));0<f&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",f));return b};EditorUi.prototype.saveCanvas=function(a,c,d,f,m){var b="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+"."+b;a=this.createImageDataUri(a,c,d,m);this.saveData(f,b,a.substring(a.lastIndexOf(",")+
+function(){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));var m=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(e,"click",
+mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);b!=g&&b!=c?(d(),k(),mxEvent.consume(a)):m()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(m,3E4);b=!0}return b};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};
+EditorUi.prototype.createImageDataUri=function(a,c,d,f){var b=a.toDataURL("image/"+d);if(6>=b.length||b==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c)));0<f&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",f));return b};EditorUi.prototype.saveCanvas=function(a,c,d,f,n){var b="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+"."+b;a=this.createImageDataUri(a,c,d,n);this.saveData(f,b,a.substring(a.lastIndexOf(",")+
1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,c){var b=new TextareaDialog(this,a,c,null,null,mxResources.get("close"));b.textarea.style.width="600px";b.textarea.style.height="380px";this.showDialog(b.container,
-620,460,!0,!0,null,null,null,null,!0);b.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,c,d,f,m,l){"text/xml"!=d||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||(c=c+"."+(null!=l?l:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,c);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",
+620,460,!0,!0,null,null,null,null,!0);b.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,c,d,f,n,l){"text/xml"!=d||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||(c=c+"."+(null!=l?l:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,c);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",
!0,c),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(c+":",a):this.openInNewWindow(a,d,f);else{var b=document.createElement("a");l=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof b.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);l=65==(e?parseInt(e[2],10):!1)?!1:l}if(l||this.isOffline()){b.href=URL.createObjectURL(f?
-this.base64ToBlob(a,d):new Blob([a],{type:d}));l?b.download=c:b.setAttribute("target","_blank");document.body.appendChild(b);try{window.setTimeout(function(){URL.revokeObjectURL(b.href)},2E4),b.click(),b.parentNode.removeChild(b)}catch(y){}}else this.createEchoRequest(a,c,d,f,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,c,d,f,m,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=m?"&format="+m:"")+(null!=l?"&base64="+
-l:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,c){c=c||"";for(var b=atob(a),e=b.length,d=Math.ceil(e/1024),f=Array(d),k=0;k<d;++k){for(var t=1024*k,n=Math.min(t+1024,e),x=Array(n-t),q=0;t<n;++q,++t)x[q]=b[t].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:c})};EditorUi.prototype.saveLocalFile=function(a,c,d,f,m,l,k,t){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(l);
-isLocalStorage&&m++;var b=4>=m?2:6<m?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,f);else{var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),e.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(a,b,d,f,null,t):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(e){try{this.exportFile(a,
-b,d,f,c,e)}catch(z){this.handleError(z)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,k,null,1<m,b,a,d,f);l=this.isServices(m)?m>b?390:270:160;this.showDialog(c.container,400,l,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(a,c,d){var b=window.open("about:blank");null==b||null==b.document?mxUtils.popup(a,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?b.document.write("<html>"+
+this.base64ToBlob(a,d):new Blob([a],{type:d}));l?b.download=c:b.setAttribute("target","_blank");document.body.appendChild(b);try{window.setTimeout(function(){URL.revokeObjectURL(b.href)},2E4),b.click(),b.parentNode.removeChild(b)}catch(y){}}else this.createEchoRequest(a,c,d,f,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,c,d,f,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+
+l:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,c){c=c||"";for(var b=atob(a),e=b.length,d=Math.ceil(e/1024),f=Array(d),k=0;k<d;++k){for(var t=1024*k,m=Math.min(t+1024,e),v=Array(m-t),q=0;t<m;++q,++t)v[q]=b[t].charCodeAt(0);f[k]=new Uint8Array(v)}return new Blob(f,{type:c})};EditorUi.prototype.saveLocalFile=function(a,c,d,f,n,l,k,t){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(l);
+isLocalStorage&&n++;var b=4>=n?2:6<n?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,f);else{var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),e.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(a,b,d,f,null,t):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(e){try{this.exportFile(a,
+b,d,f,c,e)}catch(A){this.handleError(A)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,k,null,1<n,b,a,d,f);l=this.isServices(n)?n>b?390:270:160;this.showDialog(c.container,400,l,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(a,c,d){var b=window.open("about:blank");null==b||null==b.document?mxUtils.popup(a,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?b.document.write("<html>"+
a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),b.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+a+'"/></html>')):b.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),b.document.close())};var f=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 e=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=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var d=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});d.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){d.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.style.backgroundColor="white";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)}),null,null,null,null,null,null,null,5);mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
-Editor.cameraLargeImage,mxResources.get("export"))}f.apply(this,arguments)};EditorUi.prototype.saveData=function(a,c,d,f,m){this.isLocalFileSave()?this.saveLocalFile(d,a,f,m,c):this.saveRequest(a,c,mxUtils.bind(this,function(a,b){return this.createEchoRequest(d,a,f,m,c,b)}),d,m,f)};EditorUi.prototype.saveRequest=function(a,c,d,f,m,l,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var b=this.getServiceCount(!1);isLocalStorage&&b++;var e=4>=b?2:6<b?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
-function(a,b){if("_blank"==b||null!=a&&0<a.length){var e=d("_blank"==b?null:a,b==App.MODE_DEVICE||"download"==b||null==b||"_blank"==b?"0":"1");null!=e&&(b==App.MODE_DEVICE||"download"==b||"_blank"==b?e.simulate(document,"_blank"):this.pickFolder(b,mxUtils.bind(this,function(d){l=null!=l?l:"pdf"==c?"application/pdf":"image/"+c;if(null!=f)try{this.exportFile(f,a,l,!0,b,d)}catch(z){this.handleError(z)}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,l,!0,b,d)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<b,e,f,l,m);b=this.isServices(b)?4<b?390:270:160;this.showDialog(a.container,380,b,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
-a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,c,d,f,m,l){};EditorUi.prototype.pickFolder=function(a,c,d){c(null)};EditorUi.prototype.exportSvg=function(a,c,d,f,m,l,k,t,n,x,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;var e=c?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==c&&(e=q?this.editor.graph.defaultPageBackgroundColor:
-"#ffffff");var g=this.editor.graph.getSvg(e,a,k,t,null,d,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,q);f&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",y=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,n,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
-b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,y,this.thumbImageCache)):y(g)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,c,d,f,m,l,k){return this.addCheckbox(a,
-d,f,m,l,k,!0,c)};EditorUi.prototype.addCheckbox=function(a,c,d,f,m,l,k,n){l=null!=l?l:!0;var b=document.createElement("input");b.style.marginRight="8px";b.style.marginTop="16px";b.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();b.id=k;null!=n&&b.setAttribute("name",n);d&&(b.setAttribute("checked","checked"),b.defaultChecked=!0);f&&b.setAttribute("disabled","disabled");l&&(a.appendChild(b),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",k),a.appendChild(d),
-m||mxUtils.br(a));return b};EditorUi.prototype.addEditButton=function(a,c){var b=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);b.style.marginLeft="24px";var e=this.getCurrentFile(),d="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,
+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)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
+Editor.cameraLargeImage,mxResources.get("export"))}f.apply(this,arguments)};EditorUi.prototype.saveData=function(a,c,d,f,n){this.isLocalFileSave()?this.saveLocalFile(d,a,f,n,c):this.saveRequest(a,c,mxUtils.bind(this,function(a,b){return this.createEchoRequest(d,a,f,n,c,b)}),d,n,f)};EditorUi.prototype.saveRequest=function(a,c,d,f,n,l,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var b=this.getServiceCount(!1);isLocalStorage&&b++;var e=4>=b?2:6<b?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
+function(a,b){if("_blank"==b||null!=a&&0<a.length){var e=d("_blank"==b?null:a,b==App.MODE_DEVICE||"download"==b||null==b||"_blank"==b?"0":"1");null!=e&&(b==App.MODE_DEVICE||"download"==b||"_blank"==b?e.simulate(document,"_blank"):this.pickFolder(b,mxUtils.bind(this,function(d){l=null!=l?l:"pdf"==c?"application/pdf":"image/"+c;if(null!=f)try{this.exportFile(f,a,l,!0,b,d)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,l,!0,b,d)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<b,e,f,l,n);b=this.isServices(b)?4<b?390:270:160;this.showDialog(a.container,380,b,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
+a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,c,d,f,n,l){};EditorUi.prototype.pickFolder=function(a,c,d){c(null)};EditorUi.prototype.exportSvg=function(a,c,d,f,n,l,k,t,m,v,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;var e=c?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==c&&(e=q?this.editor.graph.defaultPageBackgroundColor:
+"#ffffff");var g=this.editor.graph.getSvg(e,a,k,t,null,d,null,null,"blank"==v?"_blank":"self"==v?"_top":null,null,!0,q);f&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",y=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,m,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
+b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,y,this.thumbImageCache)):y(g)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,c,d,f,n,l,k){return this.addCheckbox(a,
+d,f,n,l,k,!0,c)};EditorUi.prototype.addCheckbox=function(a,c,d,f,n,l,k,t){l=null!=l?l:!0;var b=document.createElement("input");b.style.marginRight="8px";b.style.marginTop="16px";b.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();b.id=k;null!=t&&b.setAttribute("name",t);d&&(b.setAttribute("checked","checked"),b.defaultChecked=!0);f&&b.setAttribute("disabled","disabled");l&&(a.appendChild(b),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",k),a.appendChild(d),
+n||mxUtils.br(a));return b};EditorUi.prototype.addEditButton=function(a,c){var b=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);b.style.marginLeft="24px";var e=this.getCurrentFile(),d="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,
mxResources.get("makeCopy"));f.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");f.appendChild(e);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=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(b,"change",mxUtils.bind(this,function(){b.checked&&(null==c||c.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return b.checked?"blank"===f.value?"_blank":d:null},getEditInput:function(){return b},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,c){function b(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+
f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var e=document.createElement("select");e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value",
"blank");mxUtils.write(d,mxResources.get("openInNewWindow"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));e.appendChild(d);c&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(d));a.appendChild(e);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",k=null,k=mxUtils.button("",
mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(a)}));b();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=
-function(a,c,d,f,m,l,k){k=null!=k?k:[];f&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=c&&c!=mxConstants.NONE&&k.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=m&&0<m.length&&k.push("edit="+encodeURIComponent(m)),l&&k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&k.push("page-id="+this.currentPage.getId());return k};EditorUi.prototype.createLink=function(a,c,d,f,m,l,k,n,
-y){y=null!=y?y:this.createUrlParameters(a,c,d,f,m,l);a=this.getCurrentFile();c=!0;null!=k?d="#U"+encodeURIComponent(k):(a=this.getCurrentFile(),n||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),c=!1));c&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(a.getTitle()));return(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,c,d,f,m,l,k,n,y,x,q){this.getBasenames();var b={};""!=m&&m!=mxConstants.NONE&&(b.highlight=m);"auto"!==f&&(b.target=f);y||(b.lightbox=!1);b.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(b.zoom=d/100);d=[];k&&(d.push("pages"),b.resize=!0,null!=this.pages&&null!=this.currentPage&&
-(b.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),b.resize=!0);n&&d.push("layers");0<d.length&&(y&&d.push("lightbox"),b.toolbar=d.join(" "));null!=x&&0<x.length&&(b.edit=x);null!=a?b.url=a:b.xml=this.getFileData(!0,null,null,null,null,!k);c='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(c,'<script type="text/javascript" src="'+
-(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,c,d,f){var b=document.createElement("div");b.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";
-b.appendChild(e);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");e=p.cloneNode(!0);e.setAttribute("value","copy");g.appendChild(e);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));
-g.appendChild(k);mxUtils.br(g);g.appendChild(p);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var n=this.getCurrentFile();null==d&&null!=n&&n.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));
-e.setAttribute("checked","checked");null==d&&p.setAttribute("disabled","disabled");b.appendChild(g);var q=this.addLinkSection(b),A=this.addCheckbox(b,mxResources.get("zoom"),!0,null,!0);mxUtils.write(b,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";b.appendChild(C);var z=this.addCheckbox(b,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=
-E=this.addCheckbox(b,mxResources.get("allPages"),g,!g),G=this.addCheckbox(b,mxResources.get("layers"),!0),F=this.addCheckbox(b,mxResources.get("lightbox"),!0),I=this.addEditButton(b,F),J=I.getEditInput();J.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,b,
-mxUtils.bind(this,function(){f(p.checked?d:null,A.checked,C.value,q.getTarget(),q.getColor(),z.checked,E.checked,G.checked,F.checked,I.getLink())}),null,a,c);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,c,d,f,m,l,k){k=document.createElement("div");k.style.whiteSpace="nowrap";var b=document.createElement("h3");mxUtils.write(b,a||mxResources.get("link"));b.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(b);
-var e=this.getCurrentFile(),b="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=e&&e.constructor==window.DriveFile&&!c){a=80;var b="https://desk.draw.io/support/solutions/articles/16000039384",g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));g.appendChild(p);
-p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(e.getId())}));p.style.marginTop="12px";p.className="geBtn";g.appendChild(p);k.appendChild(g);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));g.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
-mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,q=null;if(null!=d||null!=f)a+=30,mxUtils.write(k,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%",k.appendChild(n),mxUtils.write(k,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=f+"px",k.appendChild(q),mxUtils.br(k);var v=this.addLinkSection(k,l);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==e||e.constructor!=window.DriveFile||c)E=this.addCheckbox(k,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(k,mxResources.get("lightbox"),!0),
-F=this.addEditButton(k,G),I=F.getEditInput(),J=this.addCheckbox(k,mxResources.get("layers"),!0);J.style.marginLeft=I.style.marginLeft;J.style.marginBottom="16px";J.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(J.removeAttribute("disabled"),I.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));I.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});
-c=new CustomDialog(this,k,mxUtils.bind(this,function(){m(v.getTarget(),v.getColor(),null==E?!0:E.checked,G.checked,F.getLink(),J.checked,null!=n?n.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),b);this.showDialog(c.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)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,c,d,f,m){var b=document.createElement("div");
-b.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:"+(m?"10":"4")+"px";b.appendChild(e);if(m){mxUtils.write(b,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";b.appendChild(g);mxUtils.write(b,
-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";b.appendChild(p);mxUtils.br(b)}var k=this.addCheckbox(b,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=f?null:this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,q=f?null:this.addCheckbox(b,mxResources.get("transparentBackground"),
-e.background==mxConstants.NONE||null==e.background);null!=q&&(q.style.marginBottom="16px");a=new CustomDialog(this,b,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(p.value)||0;d(!k.checked,null!=n?n.checked:!1,null!=q?q.checked:!1,a,b)}),null,a,c);this.showDialog(a.container,300,(m?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,c,d,f,m,l,k,n){k=null!=k?k:!0;var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=this.editor.graph,g="jpeg"==
-n?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";b.appendChild(p);mxUtils.write(b,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";b.appendChild(t);mxUtils.write(b,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";b.appendChild(q);mxUtils.br(b);var v=this.addCheckbox(b,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),G=null;"dark"==uiTheme&&(G=this.addCheckbox(b,mxResources.get("dark"),!0),g+=26);var F=this.addCheckbox(b,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight=
-"8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");l&&(b.appendChild(I),mxUtils.write(b,mxResources.get("crop")),mxUtils.br(b),g+=26,mxEvent.addListener(F,"change",function(){F.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));e.isSelectionEmpty()||(I.setAttribute("checked","checked"),I.defaultChecked=!0);var J=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible),u=document.createElement("input");u.style.marginTop=
-"16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||u.setAttribute("disabled","disabled");c&&(b.appendChild(u),mxUtils.write(b,mxResources.get("embedImages")),mxUtils.br(b),g+=26);var K=null;if("png"==n||"jpeg"==n)K=this.addCheckbox(b,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var B=this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=n),L=null!=this.pages&&1<this.pages.length,
-O=this.addCheckbox(b,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=n);O.style.marginLeft="24px";O.style.marginBottom="16px";L?g+=26:O.style.display="none";mxEvent.addListener(B,"change",function(){B.checked&&L?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});k&&L||O.setAttribute("disabled","disabled");var H=document.createElement("select");H.style.maxWidth="260px";H.style.marginLeft="8px";H.style.marginRight="10px";H.className="geBtn";a=document.createElement("option");a.setAttribute("value",
-"auto");mxUtils.write(a,mxResources.get("automatic"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));H.appendChild(a);"svg"==n&&(mxUtils.write(b,mxResources.get("links")+":"),b.appendChild(H),mxUtils.br(b),mxUtils.br(b),g+=26);d=new CustomDialog(this,b,mxUtils.bind(this,function(){this.lastExportBorder=
-q.value;this.lastExportZoom=t.value;m(t.value,v.checked,!F.checked,J.checked,B.checked,u.checked,q.value,I.checked,!O.checked,H.value,null!=K?K.checked:null,null!=G?G.checked:null)}),null,d,f);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,c,d,f,m){var b=document.createElement("div");b.style.whiteSpace=
-"nowrap";var e=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";b.appendChild(g)}var p=this.addCheckbox(b,mxResources.get("fit"),!0),k=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible&&f,!f),n=this.addCheckbox(b,d),q=this.addCheckbox(b,mxResources.get("lightbox"),!0),C=this.addEditButton(b,q),z=C.getEditInput(),E=1<e.model.getChildCount(e.model.getRoot()),G=this.addCheckbox(b,
-mxResources.get("layers"),E,!E);G.style.marginLeft=z.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&G.removeAttribute("disabled"),z.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"));z.checked&&q.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,b,mxUtils.bind(this,function(){a(p.checked,
-k.checked,n.checked,q.checked,C.getLink(),G.checked)}),null,mxResources.get("embed"),m);this.showDialog(c.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,c,d,f,m,l,k,n){function b(b){var c=" ",g="";f&&(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('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(m?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var p="";d&&(p=' width="'+Math.round(e.width)+'" height="'+Math.round(e.height)+'"');k('<img src="'+b+'"'+p+(""!=g?' style="'+g+'"':"")+c+"/>")}var e=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var c=f?this.getFileData(!0):null;a=this.createImageDataUri(a,c,"png");b(a)}),null,
-null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,c);else if(c=this.getFileData(!0),e.width*e.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*e.width)+"&h="+Math.round(2*e.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+g+"&xml="+encodeURIComponent(c));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?b("data:image/png;base64,"+p.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,c,d,f,m,l,k){var b=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),e=b.getElementsByTagName("a");if(null!=e)for(var g=0;g<e.length;g++){var p=e[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==e[g].getAttribute("target")&&e[g].removeAttribute("target")}f&&b.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(b);if(d){var n=" ",q="";f&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(m?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.editor.convertImages(b,mxUtils.bind(this,function(a){k('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",f&&(b.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(m?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(b.getAttribute("width")),c=parseInt(b.getAttribute("height")),b.setAttribute("viewBox","-0.5 -0.5 "+a+" "+c),q+="max-width:100%;max-height:"+c+"px;",b.removeAttribute("height")),""!=q&&b.setAttribute("style",q),this.editor.addFontCss(b),this.editor.graph.mathEnabled&&this.editor.addMathCss(b),k(mxUtils.getXml(b))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+function(a,c,d,f,n,l,k){k=null!=k?k:[];f&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=c&&c!=mxConstants.NONE&&k.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=n&&0<n.length&&k.push("edit="+encodeURIComponent(n)),l&&k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&k.push("page-id="+this.currentPage.getId());return k};EditorUi.prototype.createLink=function(a,c,d,f,n,l,k,m,
+y){y=null!=y?y:this.createUrlParameters(a,c,d,!1,n,l);a=this.getCurrentFile();c=!0;null!=k?d="#U"+encodeURIComponent(k):(a=this.getCurrentFile(),m||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),c=!1));c&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(a.getTitle()));return(f?EditorUi.lightboxHost:
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,c,d,f,n,l,k,m,y,v,q){this.getBasenames();var b={};""!=n&&n!=mxConstants.NONE&&(b.highlight=n);"auto"!==f&&(b.target=f);y||(b.lightbox=!1);b.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(b.zoom=d/100);d=[];k&&(d.push("pages"),b.resize=!0,null!=this.pages&&
+null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),b.resize=!0);m&&d.push("layers");0<d.length&&(y&&d.push("lightbox"),b.toolbar=d.join(" "));null!=v&&0<v.length&&(b.edit=v);null!=a?b.url=a:b.xml=this.getFileData(!0,null,null,null,null,!k);c='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";
+q(c,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,c,d,f){var b=document.createElement("div");b.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";b.appendChild(e);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");e=k.cloneNode(!0);e.setAttribute("value","copy");g.appendChild(e);
+var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(p);mxUtils.br(g);g.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));g.appendChild(p);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.style.cursor="pointer",mxUtils.write(p,mxResources.get("share")),g.appendChild(p),mxEvent.addListener(p,
+"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));e.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");b.appendChild(g);var q=this.addLinkSection(b),z=this.addCheckbox(b,mxResources.get("zoom"),!0,null,!0);mxUtils.write(b,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";b.appendChild(C);
+var A=this.addCheckbox(b,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(b,mxResources.get("allPages"),g,!g),G=this.addCheckbox(b,mxResources.get("layers"),!0),F=this.addCheckbox(b,mxResources.get("lightbox"),!0),I=this.addEditButton(b,F),J=I.getEditInput();J.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):
+I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,b,mxUtils.bind(this,function(){f(k.checked?d:null,z.checked,C.value,q.getTarget(),q.getColor(),A.checked,E.checked,G.checked,F.checked,I.getLink())}),null,a,c);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,c,d,f,n,l,k){k=document.createElement("div");k.style.whiteSpace="nowrap";var b=document.createElement("h3");mxUtils.write(b,a||mxResources.get("link"));b.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(b);var e=this.getCurrentFile(),b="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=e&&e.constructor==window.DriveFile&&!c){a=80;var b="https://desk.draw.io/support/solutions/articles/16000039384",g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace=
+"normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));g.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(e.getId())}));p.style.marginTop="12px";p.className="geBtn";g.appendChild(p);k.appendChild(g);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));g.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,
+function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,q=null;if(null!=d||null!=f)a+=30,mxUtils.write(k,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight=
+"16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",k.appendChild(m),mxUtils.write(k,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=f+"px",k.appendChild(q),mxUtils.br(k);var x=this.addLinkSection(k,l);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==e||e.constructor!=window.DriveFile||c)E=
+this.addCheckbox(k,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(k,mxResources.get("lightbox"),!0,null,null,!l),F=this.addEditButton(k,G),I=F.getEditInput();l&&(I.style.marginLeft=G.style.marginLeft,G.style.display="none",a-=30);var J=this.addCheckbox(k,mxResources.get("layers"),!0);J.style.marginLeft=I.style.marginLeft;J.style.marginBottom="16px";J.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(J.removeAttribute("disabled"),I.removeAttribute("disabled")):(J.setAttribute("disabled",
+"disabled"),I.setAttribute("disabled","disabled"));I.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,k,mxUtils.bind(this,function(){n(x.getTarget(),x.getColor(),null==E?!0:E.checked,G.checked,F.getLink(),J.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),b);this.showDialog(c.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,c,d,f,n){var b=document.createElement("div");b.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:"+(n?"10":"4")+"px";b.appendChild(e);if(n){mxUtils.write(b,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
+"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";b.appendChild(g);mxUtils.write(b,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";b.appendChild(k);mxUtils.br(b)}var p=this.addCheckbox(b,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
+m=f?null:this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,q=f?null:this.addCheckbox(b,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=q&&(q.style.marginBottom="16px");a=new CustomDialog(this,b,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;d(!p.checked,null!=m?m.checked:!1,null!=q?q.checked:!1,a,b)}),null,a,c);this.showDialog(a.container,300,(n?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(a,c,d,f,n,l,k,m){k=null!=k?k:!0;var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=this.editor.graph,g="jpeg"==m?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";b.appendChild(p);mxUtils.write(b,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
+"12px";t.value=this.lastExportZoom||"100%";b.appendChild(t);mxUtils.write(b,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";b.appendChild(q);mxUtils.br(b);var x=this.addCheckbox(b,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),G=null;"dark"==uiTheme&&(G=this.addCheckbox(b,mxResources.get("dark"),!0),g+=26);var F=this.addCheckbox(b,
+mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");l&&(b.appendChild(I),mxUtils.write(b,mxResources.get("crop")),mxUtils.br(b),g+=26,mxEvent.addListener(F,"change",function(){F.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));e.isSelectionEmpty()||(I.setAttribute("checked","checked"),
+I.defaultChecked=!0);var J=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||u.setAttribute("disabled","disabled");c&&(b.appendChild(u),mxUtils.write(b,mxResources.get("embedImages")),mxUtils.br(b),g+=26);var K=null;if("png"==m||"jpeg"==m)K=this.addCheckbox(b,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
+!0),g+=26;var B=this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),L=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(b,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=m);O.style.marginLeft="24px";O.style.marginBottom="16px";L?g+=26:O.style.display="none";mxEvent.addListener(B,"change",function(){B.checked&&L?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});k&&L||O.setAttribute("disabled","disabled");var H=document.createElement("select");
+H.style.maxWidth="260px";H.style.marginLeft="8px";H.style.marginRight="10px";H.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));H.appendChild(a);"svg"==
+m&&(mxUtils.write(b,mxResources.get("links")+":"),b.appendChild(H),mxUtils.br(b),mxUtils.br(b),g+=26);d=new CustomDialog(this,b,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;n(t.value,x.checked,!F.checked,J.checked,B.checked,u.checked,q.value,I.checked,!O.checked,H.value,null!=K?K.checked:null,null!=G?G.checked:null)}),null,d,f);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,c,d,f,n){var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=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";b.appendChild(g)}var k=this.addCheckbox(b,mxResources.get("fit"),!0),p=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible&&f,
+!f),m=this.addCheckbox(b,d),q=this.addCheckbox(b,mxResources.get("lightbox"),!0),C=this.addEditButton(b,q),A=C.getEditInput(),E=1<e.model.getChildCount(e.model.getRoot()),G=this.addCheckbox(b,mxResources.get("layers"),E,!E);G.style.marginLeft=A.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&G.removeAttribute("disabled"),A.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));
+A.checked&&q.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,b,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,q.checked,C.getLink(),G.checked)}),null,mxResources.get("embed"),n);this.showDialog(c.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,c,d,f,n,l,k,m){function b(b){var c=" ",g="";f&&(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('"+
+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var p="";d&&(p=' width="'+Math.round(e.width)+'" height="'+Math.round(e.height)+'"');k('<img src="'+b+'"'+p+(""!=g?' style="'+g+'"':"")+c+"/>")}var e=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var c=f?this.getFileData(!0):null;a=this.createImageDataUri(a,c,"png");b(a)}),null,null,null,
+mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),e.width*e.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*e.width)+"&h="+Math.round(2*e.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+g+"&xml="+encodeURIComponent(c));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?b("data:image/png;base64,"+
+p.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,c,d,f,n,l,k){var b=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),e=b.getElementsByTagName("a");if(null!=e)for(var g=0;g<e.length;g++){var p=e[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==e[g].getAttribute("target")&&e[g].removeAttribute("target")}f&&b.setAttribute("content",this.getFileData(!0));
+c&&this.editor.graph.addSvgShadow(b);if(d){var m=" ",q="";f&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&
+(q+="max-width:100%;");this.editor.convertImages(b,mxUtils.bind(this,function(a){k('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+m+"/>")}))}else q="",f&&(b.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(b.getAttribute("width")),c=parseInt(b.getAttribute("height")),b.setAttribute("viewBox","-0.5 -0.5 "+a+" "+c),q+="max-width:100%;max-height:"+c+"px;",b.removeAttribute("height")),""!=q&&b.setAttribute("style",q),this.editor.addFontCss(b),this.editor.graph.mathEnabled&&this.editor.addMathCss(b),k(mxUtils.getXml(b))};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.decodeNodeIntoGraph=function(a,c){if(null!=a){var b=null;if("diagram"==a.nodeName)b=a;else if("mxfile"==
a.nodeName){var e=a.getElementsByTagName("diagram");if(0<e.length){var b=e[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&&(a=Editor.parseDiagramNode(b))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(a)}catch(l){}finally{this.editor.graph=e}return a};EditorUi.prototype.getPngFileProperties=function(a){var b=1,c=0;if(null!=a){if(a.hasAttribute("scale")){var d=
-parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(b=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(c=d))}return{scale:b,border:c}};EditorUi.prototype.getEmbeddedPng=function(a,c,d,f,m){try{var b=this.editor.graph,e=null!=b.themes&&"darkTheme"==b.defaultThemeName,g=null;if(null!=d&&0<d.length)b=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(b.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
+parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(b=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(c=d))}return{scale:b,border:c}};EditorUi.prototype.getEmbeddedPng=function(a,c,d,f,n){try{var b=this.editor.graph,e=null!=b.themes&&"darkTheme"==b.defaultThemeName,g=null;if(null!=d&&0<d.length)b=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(b.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
!0),b),g=d;else if(e||null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),k=b.getGlobalVariable,p=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:k.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var d=e.toDataURL("image/png"),d=Editor.writeGraphModelToPng(d,
-"tEXt","mxfile",encodeURIComponent(g));a(d.substring(d.lastIndexOf(",")+1));b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}catch(C){null!=c&&c(C)}}),null,null,null,mxUtils.bind(this,function(a){null!=c&&c(a)}),null,null,f,null,b.shadowVisible,null,b,m)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,c,d,f,m,l,k,n){n=null!=n?n:!0;k=c.background;k==mxConstants.NONE&&(k=null);l=c.getSvg(k,null,null,null,null,l);c.shadowVisible&&c.addSvgShadow(l);null!=a&&
-l.setAttribute("content",a);null!=d&&l.setAttribute("resource",d);if(null!=m)this.embedFonts(l,mxUtils.bind(this,function(a){n?this.editor.convertImages(a,mxUtils.bind(this,function(a){m((f?"":'<?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))})):m((f?"":'<?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')+
+"tEXt","mxfile",encodeURIComponent(g));a(d.substring(d.lastIndexOf(",")+1));b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}catch(C){null!=c&&c(C)}}),null,null,null,mxUtils.bind(this,function(a){null!=c&&c(a)}),null,null,f,null,b.shadowVisible,null,b,n)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,c,d,f,n,l,k,m){m=null!=m?m:!0;k=c.background;k==mxConstants.NONE&&(k=null);l=c.getSvg(k,null,null,null,null,l);c.shadowVisible&&c.addSvgShadow(l);null!=a&&
+l.setAttribute("content",a);null!=d&&l.setAttribute("resource",d);if(null!=n)this.embedFonts(l,mxUtils.bind(this,function(a){m?this.editor.convertImages(a,mxUtils.bind(this,function(a){n((f?"":'<?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))})):n((f?"":'<?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(f?"":'<?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(l)};EditorUi.prototype.embedFonts=function(a,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.editor.addFontCss(a,b),c(a)}catch(p){c(a)}}))}catch(g){c(a)}}))};
-EditorUi.prototype.exportImage=function(a,c,d,f,m,l,k,n,q,x,D,A){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,m?this.getFileData(!0,null,null,null,d,n):null,q,null==this.pages||0==this.pages.length,D)}catch(E){"Invalid image"==E.message?this.downloadFile(q):
-this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,c,f,null,null,l,k,x,A)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,c,d,f,m){c=null!=c?c:0;d=null!=d?d:0;var b=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
-var k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var g=[],n=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),f=!1,n=1);for(;n<p.length;n++){var q=
-p[n].getAttribute("id");p[n].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(p[n]));a[q]=p[n].getAttribute("id");var z=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[z+1]));e.model.execute(new ChangePage(this,C,C,z,!0));g.push(C)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(b=e.importGraphModel(k,c,d,f),null!=b))for(n=0;n<b.length;n++)this.updatePageLinksForCell(a,b[n])}finally{e.model.endUpdate()}}}catch(E){if(m)throw E;this.handleError(E)}return b};
-EditorUi.prototype.updatePageLinks=function(a,c){for(var b=0;b<c.length;b++)this.updatePageLinksForCell(a,c[b].root)};EditorUi.prototype.updatePageLinksForCell=function(a,c){var b=document.createElement("div"),e=this.editor.graph,d=e.getLinkForCell(c);null!=d&&e.setLinkForCell(c,this.updatePageLink(a,d));if(e.isHtmlLabel(c)){b.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var f=b.getElementsByTagName("a"),k=!1,n=0;n<f.length;n++)d=f[n].getAttribute("href"),null!=d&&(f[n].setAttribute("href",this.updatePageLink(a,
-d)),k=!0);k&&e.labelChanged(c,b.innerHTML)}for(n=0;n<e.model.getChildCount(c);n++)this.updatePageLinksForCell(a,e.model.getChildAt(c,n))};EditorUi.prototype.updatePageLink=function(a,c){if("data:page/id,"==c.substring(0,13)){var b=a[c.substring(c.indexOf(",")+1)];c=null!=b?"data:page/id,"+b:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var d=0;d<e.actions.length;d++){var f=e.actions[d];null!=f.open&&"data:page/id,"==f.open.substring(0,
-13)&&(b=a[f.open.substring(f.open.indexOf(",")+1)],null!=b?f.open="data:page/id,"+b:delete f.open)}c="data:action/json,"+JSON.stringify(e)}}catch(v){}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,c,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var b=this.isRemoteVisioFormat(f);
-try{var e="UNKNOWN-VISIO",g=f.lastIndexOf(".");if(0<=g&&g<f.length)e=f.substring(g+1).toUpperCase();else{var m=f.lastIndexOf("/");0<=m&&m<f.length&&(f=f.substring(m+1))}EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:b?"remote":"local"})}catch(D){}if(b)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{b=new FormData;b.append("file1",a,f);var k=new XMLHttpRequest;
-k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var b=new FileReader;b.onload=mxUtils.bind(this,function(a){try{c(a.target.result)}catch(z){d({message:mxResources.get("errorLoadingFile")})}});b.readAsText(a)}else this.doImportVisio(a,c,d,f)}catch(C){d(C)}else d({})});k.send(b)}else try{this.doImportVisio(a,c,d,f)}catch(D){d(D)}}else this.spinner.stop(),
-this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?b():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.importGraphML=function(a,c,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,c,d)}catch(m){d(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
+EditorUi.prototype.exportImage=function(a,c,d,f,n,l,k,m,q,v,D,z){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,n?this.getFileData(!0,null,null,null,d,m):null,q,null==this.pages||0==this.pages.length,D)}catch(E){"Invalid image"==E.message?this.downloadFile(q):
+this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,c,f,null,null,l,k,v,z)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,c,d,f,n){c=null!=c?c:0;d=null!=d?d:0;var b=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
+var k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var g=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),f=!1,m=1);for(;m<p.length;m++){var q=
+p[m].getAttribute("id");p[m].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(p[m]));a[q]=p[m].getAttribute("id");var A=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[A+1]));e.model.execute(new ChangePage(this,C,C,A,!0));g.push(C)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(b=e.importGraphModel(k,c,d,f),null!=b))for(m=0;m<b.length;m++)this.updatePageLinksForCell(a,b[m])}finally{e.model.endUpdate()}}}catch(E){if(n)throw E;this.handleError(E)}return b};
+EditorUi.prototype.updatePageLinks=function(a,c){for(var b=0;b<c.length;b++)this.updatePageLinksForCell(a,c[b].root)};EditorUi.prototype.updatePageLinksForCell=function(a,c){var b=document.createElement("div"),e=this.editor.graph,d=e.getLinkForCell(c);null!=d&&e.setLinkForCell(c,this.updatePageLink(a,d));if(e.isHtmlLabel(c)){b.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var f=b.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)d=f[m].getAttribute("href"),null!=d&&(f[m].setAttribute("href",this.updatePageLink(a,
+d)),k=!0);k&&e.labelChanged(c,b.innerHTML)}for(m=0;m<e.model.getChildCount(c);m++)this.updatePageLinksForCell(a,e.model.getChildAt(c,m))};EditorUi.prototype.updatePageLink=function(a,c){if("data:page/id,"==c.substring(0,13)){var b=a[c.substring(c.indexOf(",")+1)];c=null!=b?"data:page/id,"+b:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var d=0;d<e.actions.length;d++){var f=e.actions[d];null!=f.open&&"data:page/id,"==f.open.substring(0,
+13)&&(b=a[f.open.substring(f.open.indexOf(",")+1)],null!=b?f.open="data:page/id,"+b:delete f.open)}c="data:action/json,"+JSON.stringify(e)}}catch(x){}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,c,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var b=this.isRemoteVisioFormat(f);
+try{var e="UNKNOWN-VISIO",g=f.lastIndexOf(".");if(0<=g&&g<f.length)e=f.substring(g+1).toUpperCase();else{var n=f.lastIndexOf("/");0<=n&&n<f.length&&(f=f.substring(n+1))}EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:b?"remote":"local"})}catch(D){}if(b)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{b=new FormData;b.append("file1",a,f);var k=new XMLHttpRequest;
+k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var b=new FileReader;b.onload=mxUtils.bind(this,function(a){try{c(a.target.result)}catch(A){d({message:mxResources.get("errorLoadingFile")})}});b.readAsText(a)}else this.doImportVisio(a,c,d,f)}catch(C){d(C)}else d({})});k.send(b)}else try{this.doImportVisio(a,c,d,f)}catch(D){d(D)}}else this.spinner.stop(),
+this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?b():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.importGraphML=function(a,c,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,c,d)}catch(n){d(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?b():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(e){this.handleError(e)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,c,d){var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(m){}try{c(LucidImporter.importState(JSON.parse(a)))}catch(m){null!=window.console&&
-console.error(m),d(m)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(b,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",b):mxscript("js/extensions.min.js",b))};EditorUi.prototype.generateMermaidImage=function(a,c,d,f){var b=this,e=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=
+"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,c,d){var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(n){}try{c(LucidImporter.importState(JSON.parse(a)))}catch(n){null!=window.console&&
+console.error(n),d(n)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(b,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",b):mxscript("js/extensions.min.js",b))};EditorUi.prototype.generateMermaidImage=function(a,c,d,f){var b=this,e=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=
!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<c.length){var e=parseFloat(c[0].getAttribute("width")),g=parseFloat(c[0].getAttribute("height"));d(b.convertDataUri(Editor.createSvgDataUri(a)),e,
-g)}else f({message:mxResources.get("invalidInput")})}catch(D){f(D)}})}catch(v){f(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?e():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generatePlantUmlImage=function(a,c,d,f){function b(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+
+g)}else f({message:mxResources.get("invalidInput")})}catch(D){f(D)}})}catch(x){f(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?e():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generatePlantUmlImage=function(a,c,d,f){function b(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+
a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+b(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+b(a.charCodeAt(i),0,0):r+b(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=c&&(g.responseType=
-"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==c)d(this.response);else{var b=new FileReader;b.readAsDataURL(this.response);b.onloadend=function(a){var c=new Image;c.onload=function(){try{var a=c.width,e=c.height;if(0==a&&0==e){var g=b.result,l=g.indexOf(","),m=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(m).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),e=parseFloat(k[0].getAttribute("height")))}d(b.result,a,
-e)}catch(I){f(I)}};c.src=b.result};b.onerror=function(a){f(a)}}else f(a)};g.onerror=function(a){f(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,c,d){var b=this.editor.graph,e=null;b.getModel().beginUpdate();try{e=b.insertVertex(null,null,"<pre>"+a+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),b.updateCellSize(e,!0)}finally{b.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,c,d,f,m,l,k){l=null!=l?l:!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,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var b=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var e=
+"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==c)d(this.response);else{var b=new FileReader;b.readAsDataURL(this.response);b.onloadend=function(a){var c=new Image;c.onload=function(){try{var a=c.width,e=c.height;if(0==a&&0==e){var g=b.result,l=g.indexOf(","),n=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(n).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),e=parseFloat(k[0].getAttribute("height")))}d(b.result,a,
+e)}catch(I){f(I)}};c.src=b.result};b.onerror=function(a){f(a)}}else f(a)};g.onerror=function(a){f(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,c,d){var b=this.editor.graph,e=null;b.getModel().beginUpdate();try{e=b.insertVertex(null,null,"<pre>"+a+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),b.updateCellSize(e,!0)}finally{b.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,c,d,f,n,l,k){l=null!=l?l:!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,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var b=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var e=
Editor.extractGraphModelFromPdf(a);if(null!=e&&0<e.length)return this.importXml(e,c,d,l,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(e=this.extractGraphModelFromPng(a),null!=e&&0<e.length))return this.importXml(e,c,d,l,!0);if("data:image/svg+xml;"==a.substring(0,19))try{e=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(e=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0)):e=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(e,
-c,d,l,!0);if(0<g.length)return g}catch(A){}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){b.setSelectionCell(b.insertVertex(null,null,"",b.snap(c),b.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
+c,d,l,!0);if(0<g.length)return g}catch(z){}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){b.setSelectionCell(b.insertVertex(null,null,"",b.snap(c),b.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
g=Math.round(e.width*f);e=Math.round(e.height*f);b.setSelectionCell(b.insertVertex(null,null,"",b.snap(c),b.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;b.getModel().beginUpdate();try{e=b.insertVertex(b.getDefaultParent(),null,a,b.snap(c),b.snap(d),1,1,"text;"+(f?"html=1;":"")),b.updateCellSize(e),b.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{b.getModel().endUpdate()}b.setSelectionCell(e)}))}else{a=
Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,c,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,d,l));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
-mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{b=this.editor.graph;m=null;b.getModel().beginUpdate();try{m=b.insertVertex(b.getDefaultParent(),null,"",b.snap(c),b.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));b.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
-a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");m.value=a;b.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var p=b.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=p.width;m.geometry.height=p.height}Graph.isLink(m.value)&&b.setLinkForCell(m,m.value);m.geometry.width+=b.gridSize;m.geometry.height+=b.gridSize}finally{b.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<
+mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{b=this.editor.graph;n=null;b.getModel().beginUpdate();try{n=b.insertVertex(b.getDefaultParent(),null,"",b.snap(c),b.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));b.fireEvent(new mxEventObject("textInserted","cells",[n]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
+a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");n.value=a;b.updateCellSize(n);if(0<this.maxTextWidth&&n.geometry.width>this.maxTextWidth){var m=b.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=m.width;n.geometry.height=m.height}Graph.isLink(n.value)&&b.setLinkForCell(n,n.value);n.geometry.width+=b.gridSize;n.geometry.height+=b.gridSize}finally{b.getModel().endUpdate()}return[n]}}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,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,
14))};EditorUi.prototype.importLocalFile=function(a,c){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){null!=b.files&&(this.importFiles(b.files,null,null,this.maxImageSize),b.type="",b.type="file",b.value="")}));b.style.display="none";document.body.appendChild(b);this.importFileInputElt=b}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";
if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,
360,220,!0,!0,function(){window.openFile=null});if(!c){var d=this.dialog,f=d.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;f.apply(d,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,c,d){var b=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)d();else{var f=0,g,l=!1;e.forEach(function(a,
b){var e=b.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,b.async("string").then(function(a){0==a.indexOf("<mxfile ")?c(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=b))});0<f?g.async("string").then(function(e){!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(e,a.name)?b.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?c(a.responseText):d())}),a.name):d()}):l||d()}},
-function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,c,d,f,m,l,k,n,q,x,D){x=null!=x?x:!0;var b=!1,e=null,g=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,d,f,x);null!=n&&n(b)});"image"==c.substring(0,5)?(q=!1,"image/png"==c.substring(0,9)&&(c=D?null:
-this.extractGraphModelFromPng(a),null!=c&&0<c.length&&(e=this.importXml(c,d,f,x),q=!0)),q||(c=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),x&&c.isGridEnabled()&&(d=c.snap(d),f=c.snap(f)),e=[c.insertVertex(null,null,"",d,f,m,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(b=!0,this.importGraphML(a,g)):null!=q&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||
-/(\.vs(x|sx?))($|\?)/i.test(k))?(b=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(b=!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!=n&&n(null))}),k)):0==a.indexOf("PK")&&null!=q?(b=!0,this.importZipFile(q,g,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x);n(e)}))):/(\.v(sd|dx))($|\?)/i.test(k)||
-/(\.vs(s|x))($|\?)/i.test(k)||(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x));b||null==n||n(e);return e};EditorUi.prototype.importFiles=function(a,c,d,f,m,l,k,n,q,x,D,A){f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var b=null!=c&&null!=d,e=!0;c=null!=c?c:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=D||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>p){g=!0;break}var y=mxUtils.bind(this,function(){var g=
-this.editor.graph,p=g.gridSize;m=null!=m?m:mxUtils.bind(this,function(a,c,e,d,f,g,l,m,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,c,e,d,f,g,l,m,k,b,A)}catch(U){return this.handleError(U),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,y=[],v=mxUtils.bind(this,function(a,b){y[a]=b;if(0==
---q){this.spinner.stop();if(null!=n)n(y);else{var c=[];g.getModel().beginUpdate();try{for(var e=0;e<y.length;e++){var d=y[e]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}l(c)}}),z=0;z<t;z++)mxUtils.bind(this,function(b){var l=a[b];if(null!=l){var n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var n=a.target.result,t=n.indexOf(","),q=decodeURIComponent(escape(atob(n.substring(t+1)))),
-y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=A?null:q.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)?v(b,mxUtils.bind(this,function(){try{if(n.substring(0,t+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var e=a[0],k=e.getAttribute("width"),q=
-e.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,x=e.getAttribute("viewBox");if(null==x||0==x.length)e.setAttribute("viewBox","0 0 "+k+" "+q);else if(isNaN(k)||isNaN(q)){var v=x.split(" ");3<v.length&&(k=parseFloat(v[2]),q=parseFloat(v[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(e));var u=Math.min(1,Math.min(f/Math.max(1,k)),f/Math.max(1,q)),B=m(n,l.type,c+b*p,d+b*p,Math.max(1,Math.round(k*u)),Math.max(1,Math.round(q*
-u)),l.name);if(isNaN(k)||isNaN(q)){var z=new Image;z.onload=mxUtils.bind(this,function(){k=Math.max(1,z.width);q=Math.max(1,z.height);B[0].geometry.width=k;B[0].geometry.height=q;e.setAttribute("viewBox","0 0 "+k+" "+q);n=Editor.createSvgDataUri(mxUtils.getXml(e));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));g.setCellStyles("image",n,[B[0]])});z.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return B}}}catch(W){}return null})):v(b,mxUtils.bind(this,function(){return m(u,
-"text/xml",c+b*p,d+b*p,0,0,l.name)}))}else v(b,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==l.type){var B=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var z=new Image;z.src=a.target.result;v(b,mxUtils.bind(this,function(){return m(B,"text/xml",c+b*p,d+b*p,z.width,z.height,l.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(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,n){v(b,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var t=e&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(f/k,f/n)):1;return m(g,l.type,c+b*p,d+b*p,Math.round(k*t),Math.round(n*t),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),e,f,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n=a.target.result,m(n,l.type,c+b*p,d+b*p,240,160,l.name,function(a){v(b,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?m(null,l.type,c+b*p,d+b*p,240,160,l.name,function(a){v(b,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?n.readAsDataURL(l):n.readAsText(l)}})(z)});if(g){g=[];
+function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,c,d,f,n,l,k,m,q,v,D){v=null!=v?v:!0;var b=!1,e=null,g=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,d,f,v);null!=m&&m(b)});"image"==c.substring(0,5)?(q=!1,"image/png"==c.substring(0,9)&&(c=D?null:
+this.extractGraphModelFromPng(a),null!=c&&0<c.length&&(e=this.importXml(c,d,f,v),q=!0)),q||(c=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),v&&c.isGridEnabled()&&(d=c.snap(d),f=c.snap(f)),e=[c.insertVertex(null,null,"",d,f,n,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(b=!0,this.importGraphML(a,g)):null!=q&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||
+/(\.vs(x|sx?))($|\?)/i.test(k))?(b=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(b=!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!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=q?(b=!0,this.importZipFile(q,g,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,v);m(e)}))):/(\.v(sd|dx))($|\?)/i.test(k)||
+/(\.vs(s|x))($|\?)/i.test(k)||(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,v));b||null==m||m(e);return e};EditorUi.prototype.importFiles=function(a,c,d,f,n,l,k,m,q,v,D,z){f=null!=f?f:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var b=null!=c&&null!=d,e=!0;c=null!=c?c:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=D||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>p){g=!0;break}var y=mxUtils.bind(this,function(){var g=
+this.editor.graph,p=g.gridSize;n=null!=n?n:mxUtils.bind(this,function(a,c,e,d,f,g,l,n,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,c,e,d,f,g,l,n,k,b,z)}catch(U){return this.handleError(U),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,y=[],x=mxUtils.bind(this,function(a,b){y[a]=b;if(0==
+--q){this.spinner.stop();if(null!=m)m(y);else{var c=[];g.getModel().beginUpdate();try{for(var e=0;e<y.length;e++){var d=y[e]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}l(c)}}),A=0;A<t;A++)mxUtils.bind(this,function(b){var l=a[b];if(null!=l){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),q=decodeURIComponent(escape(atob(m.substring(t+1)))),
+y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=z?null:q.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)?x(b,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var e=a[0],k=e.getAttribute("width"),q=
+e.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,v=e.getAttribute("viewBox");if(null==v||0==v.length)e.setAttribute("viewBox","0 0 "+k+" "+q);else if(isNaN(k)||isNaN(q)){var u=v.split(" ");3<u.length&&(k=parseFloat(u[2]),q=parseFloat(u[3]))}m=Editor.createSvgDataUri(mxUtils.getXml(e));var x=Math.min(1,Math.min(f/Math.max(1,k)),f/Math.max(1,q)),B=n(m,l.type,c+b*p,d+b*p,Math.max(1,Math.round(k*x)),Math.max(1,Math.round(q*
+x)),l.name);if(isNaN(k)||isNaN(q)){var A=new Image;A.onload=mxUtils.bind(this,function(){k=Math.max(1,A.width);q=Math.max(1,A.height);B[0].geometry.width=k;B[0].geometry.height=q;e.setAttribute("viewBox","0 0 "+k+" "+q);m=Editor.createSvgDataUri(mxUtils.getXml(e));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[B[0]])});A.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return B}}}catch(W){}return null})):x(b,mxUtils.bind(this,function(){return n(u,
+"text/xml",c+b*p,d+b*p,0,0,l.name)}))}else x(b,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==l.type){var B=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var A=new Image;A.src=a.target.result;x(b,mxUtils.bind(this,function(){return n(B,"text/xml",c+b*p,d+b*p,A.width,A.height,l.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(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,m){x(b,mxUtils.bind(this,function(){if(null!=g&&g.length<v){var t=e&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(f/k,f/m)):1;return n(g,l.type,c+b*p,d+b*p,Math.round(k*t),Math.round(m*t),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),e,f,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,n(m,l.type,c+b*p,d+b*p,240,160,l.name,function(a){x(b,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?n(null,l.type,c+b*p,d+b*p,240,160,l.name,function(a){x(b,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?m.readAsDataURL(l):m.readAsText(l)}})(A)});if(g){g=[];
for(t=0;t<a.length;t++)g.push(a[t]);a=g;this.confirmImageResize(function(a){e=a;y()},q)}else y()};EditorUi.prototype.confirmImageResize=function(a,c){c=null!=c?c:!1;var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(e,d){if(e||c)mxSettings.setResizeImages(e?d:null),mxSettings.save();b();a(d)};null==e||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,e)};EditorUi.prototype.parseFile=function(a,c,d){d=null!=d?d:a.name;var b=new FormData;b.append("format","xml");b.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(b);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a,c){c=null!=c?c:this.resampleThreshold;return a.length>c};EditorUi.prototype.resizeImage=function(a,c,d,f,m,l){m=null!=m?m:this.maxImageSize;var b=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImage(c,l))try{var g=Math.max(b/m,e/m);if(1<g){var k=Math.round(b/g),n=Math.round(e/g),p=document.createElement("canvas");
-p.width=k;p.height=n;p.getContext("2d").drawImage(a,0,0,k,n);var q=p.toDataURL();if(q.length<c.length){var z=document.createElement("canvas");z.width=k;z.height=n;var E=z.toDataURL();q!==E&&(c=q,b=k,e=n)}}}catch(G){}d(c,b,e)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,c,d){try{var b=new Image;b.onload=function(){b.width=0<b.width?b.width:120;b.height=0<b.height?b.height:120;c(b)};null!=d&&(b.onerror=d);
-b.src=a}catch(m){if(null!=d)d(m);else throw m;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph;"dark"==uiTheme&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("plantUml")+
-":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(e,f.format,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(b,"<pre>"+d+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(d),[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=g,m.height=l,c.cellsResized([b],[m],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:e,format:f.format}))}finally{c.getModel().endUpdate()}},
-function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(e,f.config,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",d,[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=Math.max(m.width,
-g),m.height=Math.max(m.height,l),c.cellsResized([b],[m],!1));c.setAttributeForCell(b,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};var f=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,e){try{var d=this.graph.getAttributeForCell(b,"plantUmlData");if(null!=d)this.editPlantUmlData(b,e,d);else if(d=this.graph.getAttributeForCell(b,"mermaidData"),
+OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(b);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a,c){c=null!=c?c:this.resampleThreshold;return a.length>c};EditorUi.prototype.resizeImage=function(a,c,d,f,n,l){n=null!=n?n:this.maxImageSize;var b=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImage(c,l))try{var g=Math.max(b/n,e/n);if(1<g){var k=Math.round(b/g),m=Math.round(e/g),p=document.createElement("canvas");
+p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var q=p.toDataURL();if(q.length<c.length){var A=document.createElement("canvas");A.width=k;A.height=m;var E=A.toDataURL();q!==E&&(c=q,b=k,e=m)}}}catch(G){}d(c,b,e)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,c,d){try{var b=new Image;b.onload=function(){b.width=0<b.width?b.width:120;b.height=0<b.height?b.height:120;c(b)};null!=d&&(b.onerror=d);
+b.src=a}catch(n){if(null!=d)d(n);else throw n;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph;"dark"==uiTheme&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("plantUml")+
+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(e,f.format,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(b,"<pre>"+d+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(d),[b]);var k=c.model.getGeometry(b);null!=k&&(k=k.clone(),k.width=g,k.height=l,c.cellsResized([b],[k],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:e,format:f.format}))}finally{c.getModel().endUpdate()}},
+function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(e,f.config,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",d,[b]);var k=c.model.getGeometry(b);null!=k&&(k=k.clone(),k.width=Math.max(k.width,
+g),k.height=Math.max(k.height,l),c.cellsResized([b],[k],!1));c.setAttributeForCell(b,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};var f=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,e){try{var d=this.graph.getAttributeForCell(b,"plantUmlData");if(null!=d)this.editPlantUmlData(b,e,d);else if(d=this.graph.getAttributeForCell(b,"mermaidData"),
null!=d)this.editMermaidData(b,e,d);else{var g=c.getCellStyle(b);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(b):f.apply(this,arguments)}}catch(F){a.handleError(F)}};c.getLinkTitle=function(b){return a.getLinkTitle(b)};c.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(E){a.handleError(E)}return c};var k=this.clearDefaultStyle;this.clearDefaultStyle=function(){k.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
-"https://desk.draw.io/support/solutions/articles/16000051979");var m=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return m.apply(this,arguments)};var l=c.addClickHandler;c.addClickHandler=function(a,b,e){var d=b;b=function(a,b){if(null==b){var e=mxEvent.getSource(a);
+"https://desk.draw.io/support/solutions/articles/16000051979");var n=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return n.apply(this,arguments)};var l=c.addClickHandler;c.addClickHandler=function(a,b,e){var d=b;b=function(a,b){if(null==b){var e=mxEvent.getSource(a);
"a"==e.nodeName.toLowerCase()&&(b=e.getAttribute("href"))}null!=b&&c.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&c.customLinkClicked(b)&&mxEvent.consume(a);null!=d&&d(a,b)};l.call(this,a,b,e)};d.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");
-var n=c.getExportVariables;c.getExportVariables=function(){var b=n.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var t=c.getGlobalVariable;c.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():
+var m=c.getExportVariables;c.getExportVariables=function(){var b=m.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var t=c.getGlobalVariable;c.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():
"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:t.apply(this,arguments)};var q=c.labelLinkClicked;c.labelLinkClicked=function(a,b,e){var d=b.getAttribute("href");if(null==d||!c.isCustomLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!c.isEnabled()||null!=a&&c.isCellLocked(a.cell))c.customLinkClicked(d),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=
-function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
+function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,
function(a){var b=this.editor.graph,c=b.cellEditor.text2,e=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=e&&(e.parentNode.removeChild(e),e=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<
a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,e,d,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var e=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,e)),d/Math.max(1,a));b.insertImage(decodeURIComponent(c),e*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()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view,x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");
-null!=x&&(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)})),x.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)}}x=document.getElementById("geInfo");
-null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=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!=A&&(A.parentNode.removeChild(A),A=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),e=c.view.translate,d=c.view.scale,f=b.x/d-e.x,g=b.y/d-e.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));
-else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,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=c.sanitizeHtml(m);var k=null,e=b.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),
-null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(k=!0)):(e=b.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(m=mxUtils.getTextContent(b[0]))));var n=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,f,g,!0,k,null,n))});k&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?
+a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(v=this.editor.graph.view,v.setUnit(mxSettings.getUnit()),v.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,v.unit),this.refresh());if("1"==urlParams.styledev){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 D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}v=document.getElementById("geInfo");
+null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=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!=z&&(z.parentNode.removeChild(z),z=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),e=c.view.translate,d=c.view.scale,f=b.x/d-e.x,g=b.y/d-e.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));
+else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,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=c.sanitizeHtml(k);var n=null,e=b.getElementsByTagName("img");null!=e&&1==e.length?(k=e[0].getAttribute("src"),
+null==k&&(k=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(e=b.getElementsByTagName("a"),null!=e&&1==e.length?k=e[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(k=mxUtils.getTextContent(b[0]))));var m=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&null!=k&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?
this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var b=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,b)),e/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*e,a*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(l,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.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,e=!1,d=0;d<c.types.length;d++)if("text/"===
-c.types[d].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var k=f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var n=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],n.x,n.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+c.types[d].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var k=f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position=
"absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var 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||(d.style.left=c.container.scrollLeft+10+"px",d.style.top=c.container.scrollTop+10+"px",c.container.appendChild(d),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,
-"keyup",mxUtils.bind(this,function(a){var 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(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),
-this.copyCells(d,!0),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:m.apply(this,arguments)}};
-EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
-"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
-this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(b){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("customFonts");this.menus.customFonts=b;mxSettings.setCustomFonts(b);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("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
-function(a,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,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 e=mxUtils.sortCells(b.model.getTopmostCells(b.getSelectionCells())),d=mxUtils.getXml(b.encodeCells(e));mxUtils.setTextContent(a,encodeURIComponent(d));c?(b.removeCells(e,!1),b.lastPasteXml=
-null):(b.lastPasteXml=d,b.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,c,d,f){if(!mxEvent.isConsumed(a)){var b=c,e=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),b=document.createElement("div");b.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);e=!0;g=b.getElementsByTagName("style");if(null!=g)for(;0<
-g.length;)g[0].parentNode.removeChild(g[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(g=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,g==b.firstChild.nextSibling.getAttribute("href")&&
-(mxUtils.setTextContent(b,g),e=!1));k=k&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName&&(g=k.getAttribute("src"),null!=g&&(mxUtils.setTextContent(b,g),e=!1));e&&Graph.removePasteFormatting(b)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(b=document.createElement("div"),mxUtils.setTextContent(b,g))}k=b.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===
-k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{e=e?b.innerHTML:mxUtils.trim(null==b.innerText?mxUtils.getTextContent(b):
-b.innerText);g=!1;try{var n=e.lastIndexOf("%3E");0<=n&&n<e.length-3&&(e=e.substring(0,n+3))}catch(E){}try{var k=b.getElementsByTagName("span"),p=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(e);this.isCompatibleString(p)&&(g=!0,e=p)}catch(E){}try{var q=this.editor.graph;if(null!=e&&0<e.length){q.lastPasteXml==e?q.pasteCounter++:(q.lastPasteXml=e,q.pasteCounter=0);var A=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(e))q.setSelectionCells(this.importXml(e,
-A,A));else if(f&&1==q.getSelectionCount()){var C=q.getStartEditingCell(q.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==q.getCurrentCellStyle(C)[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_IMAGE,e,[C]):(q.labelChanged(C,e),Graph.isLink(e)&&q.setLinkForCell(C,e));q.setSelectionCell(C)}else{var z=q.getInsertPoint();q.isMouseInsertPoint()&&(A=0,q.lastPasteXml==e&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(e,z.x+A,z.y+A,!0))}q.isSelectionEmpty()||
-(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(E){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(E){this.handleError(E)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),
-mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
-this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var e=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?
-e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+
-encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=
-function(a){var b=0,c=0,d,f;if(null==a){f=document.body;var l=document.documentElement;d=(f.clientWidth||l.clientWidth)-3;f=Math.max(f.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=b+"px";l.style.left=c+"px";l.style.width=Math.max(0,d-3)+"px";l.style.height=
-Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};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.openFileHandle=function(a,
-c,d,f,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var b=mxUtils.bind(this,function(a){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,c))}catch(y){this.handleError(y,
-mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,c,f)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(d,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,c))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),
-200<=a.status&&299>=a.status?b(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,c,f)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();
-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,c,f)}));else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==
-d.type){var e=Editor.extractGraphModelFromPdf(a);null!=e&&(a=e)}this.spinner.stop();this.openLocalFile(a,c,f,k,null!=k?d:null)}}};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){try{this.openFileHandle(b.target.result,a.name,a,c)}catch(v){this.handleError(v)}});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);
-window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?b.readAsText(a):b.readAsDataURL(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,c,d,f,k){var b=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var b=mxUtils.parseXml(a);null!=b&&(this.editor.setGraphXml(b.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-a,c||this.defaultFilename,d,f,k))});if(null!=a&&0<a.length)null==b||!b.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=b&&b.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,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=b&&b.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var 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=[],d;for(d in a)c.push(d);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 d=this.editor.graph,e=d.getCellStyle(a);b(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(b(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),b(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),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.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
-a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
-this.installMessageHandler(mxUtils.bind(this,function(a,c,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();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,c){null!=a?a.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
-pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,l=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,
-l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
-(a=Graph.decompress(a)))}catch(da){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(U){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?
-mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
-result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));
-try{m.init()}catch(U){k.postMessage(JSON.stringify({event:"draft",error:U.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,message:g}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),
-null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},
-0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=
-g.modified);return}if("spinner"==g.action){var v=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var u=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
-this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=J;k.postMessage(JSON.stringify(b),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container);K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=
-L){for(var O=u.getGlobalVariable,u=this.createTemporaryGraph(u.getStylesheet()),H,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){H=this.updatePageRoot(this.pages[S]);break}u.getGlobalVariable=function(a){return"page"==a?H.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(u.container);u.model.setRoot(H.root)}if(null!=g.layerIds){for(var fa=u.model,ga=fa.getChildCells(fa.getRoot()),m={},S=0;S<g.layerIds.length;S++)m[g.layerIds[S]]=!0;for(S=0;S<ga.length;S++)fa.setVisible(ga[S],
-m[ga[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,null,null,null,u)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=
-a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);v=this.createLoadMessage("export");v.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ba=this.getXmlFileData();v.xml=mxUtils.getXml(ba);v.data=this.getFileData(null,null,!0,null,null,null,ba);v.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),
-v.data=this.getHtml(J,this.editor.graph),v.xml=mxUtils.getXml(J),v.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);v.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);v.format="svg";var X=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=Editor.createSvgDataUri(a);k.postMessage(JSON.stringify(v),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,
-null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(v.xml,this.editor.graph,null,!0,X,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var ca=this.editor.graph.getSvg(Y);this.embedFonts(ca,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){X(mxUtils.getXml(a))})):X(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(v),
-"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==
-uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var ha=
-this.getCurrentFile();null!=ha&&(n=l(g.xml),null!=n&&""!=n&&ha.mergeFile(new LocalFile(this,n),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),
-"*");return}}catch(U){this.handleError(U)}}var ea=mxUtils.bind(this,function(e,g){c=!0;try{a(e,g)}catch(la){this.handleError(la)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=l();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||
-window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",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));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=e;k.postMessage(JSON.stringify(m),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ea(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===
-typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ea(a.responseText,e)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ea(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),
-ea(g,e))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*");if("json"==urlParams.proto){var n=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,c){n.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,target:b,allowOpener:c}),"*")}}};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":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var d=c;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(c)):(mxUtils.write(c,mxResources.get("save")),
-c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),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.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
-a.appendChild(c),d=c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("exit")),c.setAttribute("title",mxResources.get("exit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};
-EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=
-function(a,c){for(var b=this.editor.graph,d=b.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](b);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(b.getDefaultParent(),0==d.length?null:d)},e==a.length-1,c)}};EditorUi.prototype.importCsv=function(a,c){try{var b=a.split("\n"),d=[],e=[],f={};if(0<b.length){var k={},n=null,q=null,x=null,D=null,A=null,C=null,z=null,E=null,G="",F="auto",I="auto",J=null,u=null,K=40,B=40,L=100,
-O=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=c?c(ra):(H.setSelectionCells(ra),H.scrollCellToVisible(H.getSelectionCell()))},fa=H.getFreeInsertPoint(),ga=fa.x,ba=fa.y,fa=ba,Y=null,X="auto",E=null,ca=[],ha=null,ea=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 da=a.indexOf(":");if(0<da){var Q=mxUtils.trim(a.substring(1,
-da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?Y=H.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?D=M:"labels"==Q&&0<M.length&&"-"!=M?A=JSON.parse(M):"style"==Q?n=M:"parentstyle"==Q?C=M:"stylename"==Q&&0<M.length&&"-"!=M?x=M:"styles"==Q&&0<M.length&&"-"!=M?q=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?z=M:"parent"==Q&&0<M.length&&"-"!=M?E=M:"namespace"==Q&&0<M.length&&"-"!=M?G=M:"width"==Q?F=M:"height"==Q?I=M:"left"==Q&&0<M.length?J=M:"top"==Q&&0<M.length?u=M:"ignore"==Q?ea=M.split(","):
-"connect"==Q?ca.push(JSON.parse(M)):"link"==Q?ha=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?B=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(X=M)}}}if(null==b[U])throw Error(mxResources.get("invalidOrMissingFile"));for(var la=this.editor.csvToArray(b[U]),Q=da=null,M=[],P=0;P<la.length;P++)z==la[P]&&(da=P),E==la[P]&&(Q=P),M.push(mxUtils.trim(la[P]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=
-ca)for(var T=0;T<ca.length;T++)null==k[ca[T].to]&&(k[ca[T].to]={});z=[];for(P=U+1;P<b.length;P++){var ja=this.editor.csvToArray(b[P]);if(null==ja){var sa=40<b[P].length?b[P].substring(0,40)+"...":b[P];throw Error(sa+" ("+P+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&z.push(ja)}H.model.beginUpdate();try{for(P=0;P<z.length;P++){var ja=z[P],N=null,oa=null!=da?G+ja[da]:null;null!=oa&&(N=H.model.getCell(oa));var b=null!=N,W=new mxCell(Y,new mxGeometry(ga,fa,0,0),n||"whiteSpace=wrap;html=1;");
-W.vertex=!0;W.id=oa;for(var Z=0;Z<ja.length;Z++)H.setAttributeForCell(W,M[Z],ja[Z]);if(null!=D&&null!=A){var R=A[W.getAttribute(D)];null!=R&&H.labelChanged(W,R)}if(null!=x&&null!=q){var ia=q[W.getAttribute(x)];null!=ia&&(W.style=ia)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,W.style);b&&(H.model.setGeometry(N,W.geometry),H.model.setStyle(N,W.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=W;if(!b)for(T=0;T<ca.length;T++)k[ca[T].to][N.getAttribute(ca[T].to)]=N;null!=ha&&
-"link"!=ha&&(H.setLinkForCell(N,N.getAttribute(ha)),H.setAttributeForCell(N,ha,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ka=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=J&&null!=N.getAttribute(J)&&(N.geometry.x=ga+parseFloat(N.getAttribute(J))),null!=u&&null!=N.getAttribute(u)&&(N.geometry.y=ba+parseFloat(N.getAttribute(u))),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.width=parseFloat(N.getAttribute(F.substring(1))):N.geometry.width=
-"auto"==F?ka.width+O:parseFloat(F),"@"==I.charAt(0)&&null!=N.getAttribute(I.substring(1))?N.geometry.height=parseFloat(N.getAttribute(I.substring(1))):N.geometry.height="auto"==I?ka.height+O:parseFloat(I),fa+=N.geometry.height+B);b?(null==f[oa]&&(f[oa]=[]),f[oa].push(N)):(E=null!=Q?H.model.getCell(G+ja[Q]):null,d.push(N),null!=E?(E.style=H.replacePlaceholders(E,C),H.addCell(N,E)):e.push(H.addCell(N)))}for(var qa=e.slice(),ra=e.slice(),T=0;T<ca.length;T++)for(var Aa=ca[T],P=0;P<d.length;P++){var N=
-d[P],wa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(H.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=k[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?H.replacePlaceholders(l,c.style):H.createCurrentEdgeStyle(),g=H.insertEdge(null,null,g||"",c.invert?
-f:a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);g.insert(n)}ra.push(g);mxUtils.remove(c.invert?a:f,qa)}}});wa(N,N,Aa);if(null!=f[N.id])for(Z=0;Z<f[N.id].length;Z++)wa(N,f[N.id][Z],Aa)}if(null!=ea)for(P=0;P<d.length;P++)for(N=
-d[P],Z=0;Z<ea.length;Z++)H.setAttributeForCell(N,mxUtils.trim(ea[Z]),null);if(0<e.length){var pa=new mxParallelEdgeLayout(H);pa.spacing=K;var xa=function(){0<pa.spacing&&pa.execute(H.getDefaultParent());for(var a=0;a<e.length;a++){var b=H.getCellGeometry(e[a]);b.x=Math.round(H.snap(b.x));b.y=Math.round(H.snap(b.y));"auto"==F&&(b.width=Math.round(H.snap(b.width)));"auto"==I&&(b.height=Math.round(H.snap(b.height)))}};if("["==X.charAt(0)){var ya=S;H.view.validate();this.executeLayoutList(JSON.parse(X),
-function(){xa();ya()});S=null}else if("circle"==X){var ma=new mxCircleLayout(H);ma.resetEdges=!1;var ta=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return ta.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ma.execute(H.getDefaultParent());xa()},!0,S);S=null}else if("horizontaltree"==X||"verticaltree"==X||"auto"==X&&ra.length==2*e.length-1&&1==qa.length){H.view.validate();var Ba=new mxCompactTreeLayout(H,"horizontaltree"==X);Ba.levelDistance=B;Ba.edgeRouting=!1;Ba.resetEdges=
-!1;this.executeLayout(function(){Ba.execute(H.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==X||"verticalflow"==X||"auto"==X&&1==qa.length){H.view.validate();var ua=new mxHierarchicalLayout(H,"horizontalflow"==X?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ua.intraCellSpacing=B;ua.parallelEdgeSpacing=K;ua.interRankCellSpacing=L;ua.disableEdgeStyle=!1;this.executeLayout(function(){ua.execute(H.getDefaultParent(),ra);H.moveCells(ra,ga,ba)},!0,S);S=null}else if("organic"==
-X||"auto"==X&&ra.length>e.length){H.view.validate();var na=new mxFastOrganicLayout(H);na.forceConstant=3*B;na.resetEdges=!1;var Ia=na.isVertexIgnored;na.isVertexIgnored=function(a){return Ia.apply(this,arguments)||0>mxUtils.indexOf(e,a)};pa=new mxParallelEdgeLayout(H);pa.spacing=K;this.executeLayout(function(){na.execute(H.getDefaultParent());xa()},!0,S);S=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=S&&S()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=function(a){var b=
-"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,c,d){a=new LinkDialog(this,a,c,d,!0);this.showDialog(a.container,560,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 f=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 f.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 l=b.init;b.init=function(){l.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,c){var b=1;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.gitLab||b++;c&&a&&isLocalStorage&&"1"==urlParams.browser&&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 d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
-null!=a&&a.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);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));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};
-var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,c=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.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!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(c&&
-(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||
-"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(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,d,f,k,l,n){var b=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(c,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(c,"svg",mxUtils.getXml(b.getSvg(f,k,l)),"image/svg+xml");else{var e=a.getFileData(!0,null,null,null,null,!0),g=b.getGraphBounds(),m=Math.floor(g.width*k/b.view.scale),p=Math.floor(g.height*k/b.view.scale);if(e.length<=MAX_REQUEST_SIZE&&m*p<MAX_AREA)if(a.hideDialog(),
-"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:b.getExportVariables()};a.saveRequest(c,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<n?"&dpi="+n:"")+"&bg="+(null!=f?f:"none")+"&w="+m+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(e))})}else"png"==d?a.exportImage(k,null==f||"none"==f,!0,!1,!1,l,!0,!1,null,null,n):a.exportImage(k,!1,!0,!1,
-!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,c="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var f=a;this.currentPage!=this.pages[d]&&(f=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),f.model.setRoot(this.pages[d].root));c+=this.pages[d].getName()+" "+f.getIndexableText()+" "}else c=a.getIndexableText();this.editor.graph.setEnabled(!0);
-return c};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';
-var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var n=k[a];if("R"==n.substring(0,1)){var q=JSON.parse(decodeURIComponent(n.substring(1)));l[q[0]]={id:q[0],title:q[1],downloadUrl:q[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];l[d.id]&&
-(b[d.id]=d);var e=this.addCheckbox(f,d.title,l[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==l[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));
-for(c in l)b[c]||this.closeLibrary(new RemoteLibrary(this,null,l[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
-EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):
-c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,c,d,f,k){var b=!0,e=window.setTimeout(mxUtils.bind(this,function(){b=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(e);b&&f.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(e);b&&k.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:g,error:m});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,c){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=
-this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(c=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){b(null,"Invalid Call: "+d+" is not allowed.");return}}var n=a.functionArgs;Array.isArray(n)||(n=[]);if(e.isAsync)n.push(function(){b(Array.prototype.slice.apply(arguments))}),n.push(function(a){b(null,a||"Unkown Error")}),this[d].apply(this,n);else{var q=this[d].apply(this,n);b([q])}}else b(null,"Invalid Call: "+
-d+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=function(a,c){if(null==this.database){var b=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=b)try{var d=b.open("database",2);d.onupgradeneeded=function(a){try{var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(v){null!=c&&c(v)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
-urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),n=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(J){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?n(f.resp[0]):k())}}catch(J){console.log(J)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=c;d.onblocked=function(){}}catch(m){null!=c&&c(m)}else null!=c&&c()}else a(this.database)};
-EditorUi.prototype.setDatabaseItem=function(a,c,d,f,k){this.openDatabase(mxUtils.bind(this,function(b){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],c=[c]);var e=b.transaction(k,"readwrite");e.oncomplete=d;e.onerror=f;for(b=0;b<k.length;b++)e.objectStore(k[b]).put(null!=a&&null!=a[b]?{key:a[b],data:c[b]}:c[b])}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.removeDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);b=b.transaction(f,
-"readwrite");b.oncomplete=c;b.onerror=d;for(var e=0;e<f.length;e++)b.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){try{f=f||"objects";var e=b.transaction([f],"readonly").objectStore(f).get(a);e.onsuccess=function(){c(e.result)};e.onerror=d}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],
-"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=c}catch(v){null!=c&&c(v)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=c}catch(l){null!=c&&c(l)}}),c)};EditorUi.prototype.commentsSupported=
-function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,c){var b=this.getCurrentFile();null!=b?b.getComments(a,c):a([])};EditorUi.prototype.addComment=function(a,c,d){var b=this.getCurrentFile();
-null!=b?b.addComment(a,c,d):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,c){var b=this.getCurrentFile();return null!=b?b.newComment(a,c):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();
-return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,c){var b=this.getCurrentFile();null!=b&&b.getRevisions?b.getRevisions(a,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language",
-"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,c,d,f,k,l,n,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,c,d,f,k,l,n,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
-return this.editor.embedCssFonts(a,c)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,c,d,f,k,l,n,q,y,x,D,A,C,z,E,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,c,d,f,k,l,n,q,y,x,D,A,C,z,E,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
-return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,c,d,f)};EditorUi.prototype.convertImageToDataUri=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,c)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=
-function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,c,d,f)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,c,d,f,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,c,d,f,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
-urlParams.forceMigration)return null;for(var a=[],c=0;c<localStorage.length;c++){var d=localStorage.key(c),f=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<f.length){var k="<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(k||f)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
-var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,c,f,d,k,n){function q(){for(var a=A.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==A&&b++;C.style.display=0==b?"block":"none"}function b(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}y={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
-"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),q()):e();y=null});n.className="geCommentEditBtn";l.appendChild(n);var m=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);y=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(m.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));m.focus();m.className="geCommentEditBtn gePrimaryBtn";l.appendChild(m);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function e(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function p(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function m(a){a.style.border="";a.removeChild(a.busyImg)}function l(c,d,f,k,n){function B(a,b,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){b(a,c);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);d&&(e.style.display="none")}function u(){function a(c){b.push(d);if(null!=c.replies)for(var e=0;e<c.replies.length;e++)d=d.nextSibling,a(c.replies[e])}var b=[],d=x;a(c);return{pdiv:d,replies:b}}function z(d,e,f,n,q){function t(){g(z);c.addReply(x,function(a){x.id=a;c.replies.push(x);m(z);f&&f()},function(b){y();p(z);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,q)}function y(){b(x,z,function(a){t()},!0)}var B=u().pdiv,x=a.newComment(d,a.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var z=l(x,c.replies,B,k+1);e?y():t()}if(n||!c.isResolved){C.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",c.id);x.style.marginLeft=20*k+5+"px";c.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
+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&&93!=a.keyCode)||f||(d.style.left=c.container.scrollLeft+10+"px",d.style.top=c.container.scrollTop+10+"px",c.container.appendChild(d),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,
+null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var 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(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,
+"cut",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=
+function(a){return mxEvent.getSource(a)==d?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");
+if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,
+function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(b){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("customFonts");this.menus.customFonts=b;mxSettings.setCustomFonts(b);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("dark"==uiTheme);
+this.addListener("gridColorChanged",mxUtils.bind(this,function(a,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,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 e=mxUtils.sortCells(b.model.getTopmostCells(b.getSelectionCells())),d=mxUtils.getXml(b.encodeCells(e));mxUtils.setTextContent(a,
+encodeURIComponent(d));c?(b.removeCells(e,!1),b.lastPasteXml=null):(b.lastPasteXml=d,b.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,c,d,f){if(!mxEvent.isConsumed(a)){var b=c,e=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),b=document.createElement("div");b.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);
+e=!0;g=b.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(g=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,
+g==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,g),e=!1));k=k&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName&&(g=k.getAttribute("src"),null!=g&&(mxUtils.setTextContent(b,g),e=!1));e&&Graph.removePasteFormatting(b)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(b=document.createElement("div"),mxUtils.setTextContent(b,g))}k=b.getElementsByTagName("span");
+if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));
+else{e=e?b.innerHTML:mxUtils.trim(null==b.innerText?mxUtils.getTextContent(b):b.innerText);g=!1;try{var m=e.lastIndexOf("%3E");0<=m&&m<e.length-3&&(e=e.substring(0,m+3))}catch(E){}try{var k=b.getElementsByTagName("span"),p=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(e);this.isCompatibleString(p)&&(g=!0,e=p)}catch(E){}try{var q=this.editor.graph;if(null!=e&&0<e.length){q.lastPasteXml==e?q.pasteCounter++:(q.lastPasteXml=e,q.pasteCounter=0);var z=q.pasteCounter*
+q.gridSize;if(g||this.isCompatibleString(e))q.setSelectionCells(this.importXml(e,z,z));else if(f&&1==q.getSelectionCount()){var C=q.getStartEditingCell(q.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==q.getCurrentCellStyle(C)[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_IMAGE,e,[C]):(q.labelChanged(C,e),Graph.isLink(e)&&q.setLinkForCell(C,e));q.setSelectionCell(C)}else{var A=q.getInsertPoint();q.isMouseInsertPoint()&&(z=0,q.lastPasteXml==e&&0<q.pasteCounter&&
+q.pasteCounter--);q.setSelectionCells(this.insertTextAt(e,A.x+z,A.y+z,!0))}q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(E){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(E){this.handleError(E)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",
+function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||
+"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var e=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,
+null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,
+null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,f;if(null==a){f=document.body;var l=document.documentElement;d=(f.clientWidth||l.clientWidth)-3;f=Math.max(f.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";
+l.style.top=b+"px";l.style.left=c+"px";l.style.width=Math.max(0,d-3)+"px";l.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};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.openFileHandle=function(a,c,d,f,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var b=mxUtils.bind(this,function(a){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
+f);try{this.loadLibrary(new LocalLibrary(this,a,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,c,f)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(d,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,
+c))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?b(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,c,f)}),mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,c,f)}));
+else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==d.type){var e=Editor.extractGraphModelFromPdf(a);null!=e&&(a=e)}this.spinner.stop();this.openLocalFile(a,c,f,k,null!=k?d:null)}}};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){try{this.openFileHandle(b.target.result,a.name,
+a,c)}catch(x){this.handleError(x)}});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?b.readAsText(a):b.readAsDataURL(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,c,d,f,k){var b=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var b=mxUtils.parseXml(a);
+null!=b&&(this.editor.setGraphXml(b.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,c||this.defaultFilename,d,f,k))});if(null!=a&&0<a.length)null==b||!b.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=b&&b.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,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=b&&b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var 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=[],d;for(d in a)c.push(d);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 d=this.editor.graph,e=d.getCellStyle(a);b(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(b(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),b(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),
+f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),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.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=
+a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,c,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();
+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,c){null!=a?a.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=
+function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,l=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,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&
+("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(da){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(U){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
+var n=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
+m,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(n.container,
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{n.init()}catch(U){k.postMessage(JSON.stringify({event:"draft",error:U.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,n=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
+name:c,message:g}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),
+null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(n.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
+null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?
+g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var u=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=J;k.postMessage(JSON.stringify(b),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container);
+K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=L){for(var O=u.getGlobalVariable,u=this.createTemporaryGraph(u.getStylesheet()),H,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){H=this.updatePageRoot(this.pages[S]);break}u.getGlobalVariable=function(a){return"page"==a?H.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(u.container);u.model.setRoot(H.root)}if(null!=g.layerIds){for(var fa=
+u.model,ga=fa.getChildCells(fa.getRoot()),n={},S=0;S<g.layerIds.length;S++)n[g.layerIds[S]]=!0;for(S=0;S<ga.length;S++)fa.setVisible(ga[S],n[ga[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,null,null,null,u)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");x.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();x.xml=mxUtils.getXml(aa);
+x.data=this.getFileData(null,null,!0,null,null,null,aa);x.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),x.data=this.getHtml(J,this.editor.graph),x.xml=mxUtils.getXml(J),x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);x.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);x.format="svg";var X=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=Editor.createSvgDataUri(a);
+k.postMessage(JSON.stringify(x),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,X,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var ba=this.editor.graph.getSvg(Y);this.embedFonts(ba,mxUtils.bind(this,function(a){g.embedImages||
+null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){X(mxUtils.getXml(a))})):X(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(x),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&
+(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(m),
+this.embedFilenameSpan=m),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var ha=this.getCurrentFile();null!=ha&&(m=l(g.xml),null!=m&&""!=m&&ha.mergeFile(new LocalFile(this,m),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):
+"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(U){this.handleError(U)}}var ea=mxUtils.bind(this,function(e,g){c=!0;try{a(e,g)}catch(la){this.handleError(la)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=l();
+d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",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));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var n=this.createLoadMessage("load");n.xml=e;k.postMessage(JSON.stringify(n),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",
+this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ea(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ea(a.responseText,e)}),""):null!=g&&"function"===
+typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ea(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),ea(g,e))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*");if("json"==urlParams.proto){var m=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,c){m.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,
+target:b,allowOpener:c}),"*")}}};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":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var d=c;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),
+mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(c)):(mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),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.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(c),d=c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("exit")),c.setAttribute("title",mxResources.get("exit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
+a.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));
+this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,c){for(var b=this.editor.graph,d=b.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](b);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(b.getDefaultParent(),0==d.length?null:d)},e==a.length-1,c)}};EditorUi.prototype.importCsv=function(a,c){try{var b=a.split("\n"),
+d=[],e=[],f={};if(0<b.length){var k={},m=null,q=null,v=null,D=null,z=null,C=null,A=null,E=null,G="",F="auto",I="auto",J=null,u=null,K=40,B=40,L=100,O=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=c?c(ra):(H.setSelectionCells(ra),H.scrollCellToVisible(H.getSelectionCell()))},fa=H.getFreeInsertPoint(),ga=fa.x,aa=fa.y,fa=aa,Y=null,X="auto",E=null,ba=[],ha=null,ea=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 da=a.indexOf(":");if(0<da){var Q=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?Y=H.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?D=M:"labels"==Q&&0<M.length&&"-"!=M?z=JSON.parse(M):"style"==Q?m=M:"parentstyle"==Q?C=M:"stylename"==Q&&0<M.length&&"-"!=M?v=M:"styles"==Q&&0<M.length&&"-"!=M?q=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?A=M:"parent"==Q&&0<M.length&&"-"!=M?E=M:
+"namespace"==Q&&0<M.length&&"-"!=M?G=M:"width"==Q?F=M:"height"==Q?I=M:"left"==Q&&0<M.length?J=M:"top"==Q&&0<M.length?u=M:"ignore"==Q?ea=M.split(","):"connect"==Q?ba.push(JSON.parse(M)):"link"==Q?ha=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?B=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(X=M)}}}if(null==b[U])throw Error(mxResources.get("invalidOrMissingFile"));for(var la=this.editor.csvToArray(b[U]),Q=da=null,M=[],P=0;P<la.length;P++)A==la[P]&&
+(da=P),E==la[P]&&(Q=P),M.push(mxUtils.trim(la[P]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=ba)for(var T=0;T<ba.length;T++)null==k[ba[T].to]&&(k[ba[T].to]={});A=[];for(P=U+1;P<b.length;P++){var ja=this.editor.csvToArray(b[P]);if(null==ja){var sa=40<b[P].length?b[P].substring(0,40)+"...":b[P];throw Error(sa+" ("+P+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&A.push(ja)}H.model.beginUpdate();try{for(P=0;P<A.length;P++){var ja=
+A[P],N=null,oa=null!=da?G+ja[da]:null;null!=oa&&(N=H.model.getCell(oa));var b=null!=N,W=new mxCell(Y,new mxGeometry(ga,fa,0,0),m||"whiteSpace=wrap;html=1;");W.vertex=!0;W.id=oa;for(var Z=0;Z<ja.length;Z++)H.setAttributeForCell(W,M[Z],ja[Z]);if(null!=D&&null!=z){var R=z[W.getAttribute(D)];null!=R&&H.labelChanged(W,R)}if(null!=v&&null!=q){var ia=q[W.getAttribute(v)];null!=ia&&(W.style=ia)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,W.style);b&&(H.model.setGeometry(N,
+W.geometry),H.model.setStyle(N,W.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=W;if(!b)for(T=0;T<ba.length;T++)k[ba[T].to][N.getAttribute(ba[T].to)]=N;null!=ha&&"link"!=ha&&(H.setLinkForCell(N,N.getAttribute(ha)),H.setAttributeForCell(N,ha,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ka=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=J&&null!=N.getAttribute(J)&&(N.geometry.x=ga+parseFloat(N.getAttribute(J))),null!=u&&null!=N.getAttribute(u)&&(N.geometry.y=aa+
+parseFloat(N.getAttribute(u))),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.width=parseFloat(N.getAttribute(F.substring(1))):N.geometry.width="auto"==F?ka.width+O:parseFloat(F),"@"==I.charAt(0)&&null!=N.getAttribute(I.substring(1))?N.geometry.height=parseFloat(N.getAttribute(I.substring(1))):N.geometry.height="auto"==I?ka.height+O:parseFloat(I),fa+=N.geometry.height+B);b?(null==f[oa]&&(f[oa]=[]),f[oa].push(N)):(E=null!=Q?H.model.getCell(G+ja[Q]):null,d.push(N),null!=E?(E.style=
+H.replacePlaceholders(E,C),H.addCell(N,E)):e.push(H.addCell(N)))}for(var qa=e.slice(),ra=e.slice(),T=0;T<ba.length;T++)for(var Aa=ba[T],P=0;P<d.length;P++){var N=d[P],wa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(H.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=k[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));
+var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?H.replacePlaceholders(l,c.style):H.createCurrentEdgeStyle(),g=H.insertEdge(null,null,g||"",c.invert?f:a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var n=c.labels[l],m=new mxCell(n.label||l,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");m.vertex=!0;m.connectable=!1;m.geometry.relative=!0;if(null!=n.dx||null!=n.dy)m.geometry.offset=new mxPoint(null!=n.dx?n.dx:0,null!=n.dy?n.dy:0);g.insert(m)}ra.push(g);
+mxUtils.remove(c.invert?a:f,qa)}}});wa(N,N,Aa);if(null!=f[N.id])for(Z=0;Z<f[N.id].length;Z++)wa(N,f[N.id][Z],Aa)}if(null!=ea)for(P=0;P<d.length;P++)for(N=d[P],Z=0;Z<ea.length;Z++)H.setAttributeForCell(N,mxUtils.trim(ea[Z]),null);if(0<e.length){var pa=new mxParallelEdgeLayout(H);pa.spacing=K;var xa=function(){0<pa.spacing&&pa.execute(H.getDefaultParent());for(var a=0;a<e.length;a++){var b=H.getCellGeometry(e[a]);b.x=Math.round(H.snap(b.x));b.y=Math.round(H.snap(b.y));"auto"==F&&(b.width=Math.round(H.snap(b.width)));
+"auto"==I&&(b.height=Math.round(H.snap(b.height)))}};if("["==X.charAt(0)){var ya=S;H.view.validate();this.executeLayoutList(JSON.parse(X),function(){xa();ya()});S=null}else if("circle"==X){var ma=new mxCircleLayout(H);ma.resetEdges=!1;var ta=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return ta.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ma.execute(H.getDefaultParent());xa()},!0,S);S=null}else if("horizontaltree"==X||"verticaltree"==X||"auto"==X&&ra.length==
+2*e.length-1&&1==qa.length){H.view.validate();var Ba=new mxCompactTreeLayout(H,"horizontaltree"==X);Ba.levelDistance=B;Ba.edgeRouting=!1;Ba.resetEdges=!1;this.executeLayout(function(){Ba.execute(H.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==X||"verticalflow"==X||"auto"==X&&1==qa.length){H.view.validate();var ua=new mxHierarchicalLayout(H,"horizontalflow"==X?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ua.intraCellSpacing=B;ua.parallelEdgeSpacing=K;
+ua.interRankCellSpacing=L;ua.disableEdgeStyle=!1;this.executeLayout(function(){ua.execute(H.getDefaultParent(),ra);H.moveCells(ra,ga,aa)},!0,S);S=null}else if("organic"==X||"auto"==X&&ra.length>e.length){H.view.validate();var na=new mxFastOrganicLayout(H);na.forceConstant=3*B;na.resetEdges=!1;var Ia=na.isVertexIgnored;na.isVertexIgnored=function(a){return Ia.apply(this,arguments)||0>mxUtils.indexOf(e,a)};pa=new mxParallelEdgeLayout(H);pa.spacing=K;this.executeLayout(function(){na.execute(H.getDefaultParent());
+xa()},!0,S);S=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=S&&S()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
+if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,c,d){a=new LinkDialog(this,a,c,d,!0);this.showDialog(a.container,560,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 f=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 f.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 l=b.init;b.init=function(){l.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,c){var b=1;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.gitLab||b++;c&&a&&isLocalStorage&&"1"==urlParams.browser&&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 d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);
+Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);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));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=
+function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,c=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.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!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(c&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(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,d,f,k,l,m){var b=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(c,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(c,"svg",mxUtils.getXml(b.getSvg(f,k,l)),"image/svg+xml");else{var e=a.getFileData(!0,null,null,
+null,null,!0),g=b.getGraphBounds(),n=Math.floor(g.width*k/b.view.scale),p=Math.floor(g.height*k/b.view.scale);if(e.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:b.getExportVariables()};a.saveRequest(c,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=f?f:
+"none")+"&w="+n+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(e))})}else"png"==d?a.exportImage(k,null==f||"none"==f,!0,!1,!1,l,!0,!1,null,null,m):a.exportImage(k,!1,!0,!1,!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,c="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var f=a;this.currentPage!=this.pages[d]&&(f=this.createTemporaryGraph(a.getStylesheet()),
+this.updatePageRoot(this.pages[d]),f.model.setRoot(this.pages[d].root));c+=this.pages[d].getName()+" "+f.getIndexableText()+" "}else c=a.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=
+document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var q=JSON.parse(decodeURIComponent(m.substring(1)));l[q[0]]={id:q[0],title:q[1],downloadUrl:q[2]}}}}catch(v){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==
+a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];l[d.id]&&(b[d.id]=d);var e=this.addCheckbox(f,d.title,l[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
+mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==l[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(A){this.handleError(A,
+mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in l)b[c]||this.closeLibrary(new RemoteLibrary(this,null,l[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,
+allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=
+a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,c,d,f,k){var b=!0,e=window.setTimeout(mxUtils.bind(this,function(){b=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(e);
+b&&f.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(e);b&&k.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:m});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,c){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",
+msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(c=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){b(null,"Invalid Call: "+d+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(e.isAsync)m.push(function(){b(Array.prototype.slice.apply(arguments))}),
+m.push(function(a){b(null,a||"Unkown Error")}),this[d].apply(this,m);else{var q=this[d].apply(this,m);b([q])}}else b(null,"Invalid Call: "+d+" is not found.")}catch(v){b(null,"Invalid Call: An error occured, "+v.message)}};EditorUi.prototype.openDatabase=function(a,c){if(null==this.database){var b=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=b)try{var d=b.open("database",2);d.onupgradeneeded=function(a){try{var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});
+2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=c&&c(x)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||
+"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=
+e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});
+a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(J){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(J){console.log(J)}});
+window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=c;d.onblocked=function(){}}catch(n){null!=c&&c(n)}else null!=c&&c()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,c,d,f,k){this.openDatabase(mxUtils.bind(this,function(b){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],c=[c]);var e=b.transaction(k,"readwrite");e.oncomplete=d;e.onerror=f;for(b=0;b<k.length;b++)e.objectStore(k[b]).put(null!=a&&null!=a[b]?{key:a[b],data:c[b]}:c[b])}catch(t){null!=
+f&&f(t)}}),f)};EditorUi.prototype.removeDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);b=b.transaction(f,"readwrite");b.oncomplete=c;b.onerror=d;for(var e=0;e<f.length;e++)b.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){try{f=f||"objects";var e=b.transaction([f],"readonly").objectStore(f).get(a);e.onsuccess=function(){c(e.result)};
+e.onerror=d}catch(x){null!=d&&d(x)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=c}catch(x){null!=c&&c(x)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(a,c,d){this.openDatabase(mxUtils.bind(this,
+function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=c}catch(l){null!=c&&c(l)}}),c)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=
+a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,c){var b=this.getCurrentFile();null!=b?b.getComments(a,c):a([])};EditorUi.prototype.addComment=function(a,c,d){var b=this.getCurrentFile();null!=b?b.addComment(a,c,d):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=
+function(a,c){var b=this.getCurrentFile();return null!=b?b.newComment(a,c):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,c){var b=this.getCurrentFile();null!=b&&b.getRevisions?b.getRevisions(a,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();
+return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,c,d,f,k,l,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,c,d,f,k,l,m,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
+return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,c)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,
+c,d,f,k,l,m,q,y,v,D,z,C,A,E,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,c,d,f,k,l,m,q,y,v,D,z,C,A,E,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,c,d,f)};EditorUi.prototype.convertImageToDataUri=
+function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,c)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,c,d,f)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};
+EditorUi.prototype.writeGraphModelToPng=function(a,c,d,f,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,c,d,f,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],c=0;c<localStorage.length;c++){var d=localStorage.key(c),f=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<f.length){var k="<mxfile "===
+f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(k||f)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(a,c,f,d,k,m){function q(){for(var a=z.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==z&&b++;C.style.display=0==b?"block":"none"}function b(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}y={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),q()):e();y=null});m.className="geCommentEditBtn";l.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);y=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";l.appendChild(n);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function e(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function p(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function n(a){a.style.border="";a.removeChild(a.busyImg)}function l(c,d,f,k,m){function B(a,b,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){b(a,c);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);d&&(e.style.display="none")}function u(){function a(c){b.push(d);if(null!=c.replies)for(var e=0;e<c.replies.length;e++)d=d.nextSibling,a(c.replies[e])}var b=[],d=v;a(c);return{pdiv:d,replies:b}}function A(d,e,f,m,q){function t(){g(A);c.addReply(v,function(a){v.id=a;c.replies.push(v);n(A);f&&f()},function(b){y();p(A);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,q)}function y(){b(v,A,function(a){t()},!0)}var B=u().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var A=l(v,c.replies,B,k+1);e?y():t()}if(m||!c.isResolved){C.style.display="none";var v=document.createElement("div");v.className="geCommentContainer";v.setAttribute("data-commentId",c.id);v.style.marginLeft=20*k+5+"px";c.isResolved&&"dark"!=uiTheme&&(v.style.backgroundColor="ghostWhite");
var E=document.createElement("div");E.className="geCommentHeader";var L=document.createElement("img");L.className="geCommentUserImg";L.src=c.user.pictureUrl||Editor.userImage;E.appendChild(L);L=document.createElement("div");L.className="geCommentHeaderTxt";E.appendChild(L);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,c.user.displayName||"");L.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",c.id);e(c,
-F);L.appendChild(F);x.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");x.appendChild(E);c.isLocked&&(x.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";E.appendChild(D);v||c.isLocked||0!=k&&!t||B(mxResources.get("reply"),function(){z("",!0)},c.isResolved);L=a.getCurrentUser();null==L||L.id!=c.user.id||v||c.isLocked||(B(mxResources.get("edit"),
-function(){function d(){b(c,x,function(){g(x);c.editComment(c.content,function(){m(x)},function(b){p(x);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(x);c.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var b=x.querySelectorAll(".geCommentAction");for(a=
-0;a<b.length;a++)b[a].parentNode.removeChild(b[a]);m(x);x.style.opacity="0.5"}else{b=u(c).replies;for(a=0;a<b.length;a++)A.removeChild(b[a]);for(a=0;a<d.length;a++)if(d[a]==c){d.splice(a,1);break}C.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(b){p(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));v||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function b(){var b=
-a.target;b.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(b,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=c.isResolved?"none":"",e=u(c).replies,f="dark"==uiTheme?"transparent":c.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=b.parentNode&&(k[l].style.display=d);G||(e[g].style.display="none")}q()}c.isResolved?z(mxResources.get("reOpened")+": ",!0,b,!1,
-!0):z(mxResources.get("markedAsResolved"),!1,b,!0)});x.appendChild(E);null!=f?A.insertBefore(x,f.nextSibling):A.appendChild(x);for(f=0;null!=c.replies&&f<c.replies.length;f++)E=c.replies[f],E.isResolved=c.isResolved,l(E,c.replies,null,k+1,n);null!=y&&(y.comment.id==c.id?(n=c.content,c.content=y.comment.content,b(c,x,y.saveCallback,y.deleteOnCancel),c.content=n):null==y.comment.id&&y.comment.pCommentId==c.id&&(A.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return x}}var v=
-!a.canComment(),t=a.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;A.style.bottom=parseInt(D)+7+"px";x.appendChild(A);var C=document.createElement("span");C.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(C,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=D;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter="none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!v){var E=D.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
-E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(c){function d(){b(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;F.push(b);m(f)},function(b){p(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=l(e,F,null,0);d();c.preventDefault();mxEvent.consume(c)});z.appendChild(E)}E=D.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
-E.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});z.appendChild(E);a.commentsRefreshNeeded()&&(E=D.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),
-mxEvent.addListener(E,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),z.appendChild(E));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){n();a.preventDefault();mxEvent.consume(a)}),z.appendChild(D));x.appendChild(z);var F=[],I=mxUtils.bind(this,function(){this.hasError=
-!1;if(null!=y)try{y.div=y.div.cloneNode(!0);var c=y.div.querySelector(".geCommentEditTxtArea"),d=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(B){a.handleError(B)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function c(a){if(null!=
-a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var b=0;b<a.length;b++)c(a[b].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});A.innerHTML="";A.appendChild(C);C.style.display="block";F=a;for(a=0;a<F.length;a++)c(F[a].replies),l(F[a],F,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(A.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(a){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
-(a&&a.message?": "+a.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=A.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<F.length;d++)a(F[d])}});setInterval(z,6E4);this.refreshCommentsTime=
-z;this.window=new mxWindow(mxResources.get("comments"),x,c,f,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
+F);L.appendChild(F);v.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");v.appendChild(E);c.isLocked&&(v.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";E.appendChild(D);x||c.isLocked||0!=k&&!t||B(mxResources.get("reply"),function(){A("",!0)},c.isResolved);L=a.getCurrentUser();null==L||L.id!=c.user.id||x||c.isLocked||(B(mxResources.get("edit"),
+function(){function d(){b(c,v,function(){g(v);c.editComment(c.content,function(){n(v)},function(b){p(v);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(v);c.deleteComment(function(a){if(!0===a){a=v.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var b=v.querySelectorAll(".geCommentAction");for(a=
+0;a<b.length;a++)b[a].parentNode.removeChild(b[a]);n(v);v.style.opacity="0.5"}else{b=u(c).replies;for(a=0;a<b.length;a++)z.removeChild(b[a]);for(a=0;a<d.length;a++)if(d[a]==c){d.splice(a,1);break}C.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){p(v);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));x||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function b(){var b=
+a.target;b.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(b,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=c.isResolved?"none":"",e=u(c).replies,f="dark"==uiTheme?"transparent":c.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=b.parentNode&&(k[l].style.display=d);G||(e[g].style.display="none")}q()}c.isResolved?A(mxResources.get("reOpened")+": ",!0,b,!1,
+!0):A(mxResources.get("markedAsResolved"),!1,b,!0)});v.appendChild(E);null!=f?z.insertBefore(v,f.nextSibling):z.appendChild(v);for(f=0;null!=c.replies&&f<c.replies.length;f++)E=c.replies[f],E.isResolved=c.isResolved,l(E,c.replies,null,k+1,m);null!=y&&(y.comment.id==c.id?(m=c.content,c.content=y.comment.content,b(c,v,y.saveCallback,y.deleteOnCancel),c.content=m):null==y.comment.id&&y.comment.pCommentId==c.id&&(z.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return v}}var x=
+!a.canComment(),t=a.canReplyToReplies(),y=null,v=document.createElement("div");v.className="geCommentsWin";v.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;z.style.bottom=parseInt(D)+7+"px";v.appendChild(z);var C=document.createElement("span");C.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(C,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=D;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter="none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!x){var E=D.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
+E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(c){function d(){b(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;F.push(b);n(f)},function(b){p(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=l(e,F,null,0);d();c.preventDefault();mxEvent.consume(c)});A.appendChild(E)}E=D.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
+E.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});A.appendChild(E);a.commentsRefreshNeeded()&&(E=D.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),
+mxEvent.addListener(E,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),A.appendChild(E));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),A.appendChild(D));v.appendChild(A);var F=[],I=mxUtils.bind(this,function(){this.hasError=
+!1;if(null!=y)try{y.div=y.div.cloneNode(!0);var c=y.div.querySelector(".geCommentEditTxtArea"),d=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(B){a.handleError(B)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function c(a){if(null!=
+a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var b=0;b<a.length;b++)c(a[b].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});z.innerHTML="";z.appendChild(C);C.style.display="block";F=a;for(a=0;a<F.length;a++)c(F[a].replies),l(F[a],F,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(z.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(a){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
+(a&&a.message?": "+a.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;A=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=z.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<F.length;d++)a(F[d])}});setInterval(A,6E4);this.refreshCommentsTime=
+A;this.window=new mxWindow(mxResources.get("comments"),v,c,f,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var J=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",J);this.destroy=function(){mxEvent.removeListener(window,"resize",J);this.window.destroy()}},ConfirmDialog=
-function(a,c,f,d,k,n,q,b,e,g,p){var m=document.createElement("div");m.style.textAlign="center";p=null!=p?p:44;var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight=p+"px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);m.appendChild(l);null!=g&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",g),l.appendChild(c),m.appendChild(l));g=document.createElement("div");
-g.style.textAlign="center";g.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(v.checked)});n.className="geBtn";null!=b&&(n.innerHTML=b+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");a.editor.cancelFirst&&g.appendChild(n);var t=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=f&&
-f(v.checked)});g.appendChild(t);null!=q?(t.innerHTML=q+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(n);m.appendChild(g);e?(g.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(v),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),l.appendChild(k),m.appendChild(l),
-mxEvent.addListener(k,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=m};function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+function(a,c,f,d,k,m,q,b,e,g,p){var n=document.createElement("div");n.style.textAlign="center";p=null!=p?p:44;var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight=p+"px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);n.appendChild(l);null!=g&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",g),l.appendChild(c),n.appendChild(l));g=document.createElement("div");
+g.style.textAlign="center";g.style.whiteSpace="nowrap";var x=document.createElement("input");x.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(x.checked)});m.className="geBtn";null!=b&&(m.innerHTML=b+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&g.appendChild(m);var t=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=f&&
+f(x.checked)});g.appendChild(t);null!=q?(t.innerHTML=q+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(m);n.appendChild(g);e?(g.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(x),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),l.appendChild(k),n.appendChild(l),
+mxEvent.addListener(k,"click",function(a){x.checked=!x.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=n};function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=this.name=f}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,c,f){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=f&&(c.viewState=f,this.neverShown=!1))}
@@ -3658,8 +3660,8 @@ this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNod
(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+c.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+c.viewState.scrollTop),f=c);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,c){for(var f=c.getProperty("edit").changes,b=0;b<f.length;b++)if(f[b]instanceof SelectPage||f[b]instanceof RenamePage||f[b]instanceof MovePage||f[b]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(a,c,f){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,c):(d.setViewState(c),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+c.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+c.scrollTop,d.restoreSelection(f))};
-Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),n=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null,b=a.getAttribute("extFonts");if(b)try{b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=
-a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(d)||isNaN(k)?"undefined"===
+Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null,b=a.getAttribute("extFonts");if(b)try{b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=
+a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(d)||isNaN(k)?"undefined"===
typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:b||[]}};
Graph.prototype.saveViewState=function(a,c,f){f||(c.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),c.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),c.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),c.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),c.setAttribute("connect",null==a||a.connect?"1":"0"),c.setAttribute("arrows",null==a||a.arrows?"1":"0"),c.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),c.setAttribute("fold",
null==a||a.foldingEnabled?"1":"0"));c.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);f=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=f&&(c.setAttribute("pageWidth",f.width),c.setAttribute("pageHeight",f.height));null!=a&&null!=a.background&&c.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));c.setAttribute("math",
@@ -3675,17 +3677,17 @@ Graph.prototype.addExtFont=function(a,c,f){if(a&&c){var d="extFont_"+a;if(null==
d=!0;for(k=0;k<f.length;k++)if(f[k].name==a){d=!1;break}d&&this.extFonts.push({name:a,url:c})}}};
EditorUi.prototype.updatePageRoot=function(a,c){if(null==a.root){var f=this.editor.extractGraphModel(a.node,null,c),d=Editor.extractParserError(f);if(d)throw Error(d);null!=f?(a.graphModelNode=f,a.viewState=this.editor.graph.createViewState(f),d=new mxCodec(f.ownerDocument),a.root=d.decode(f).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){f=this.editor.extractGraphModel(a.node);if(d=Editor.extractParserError(f))throw Error(d);null!=f&&(a.graphModelNode=
f)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a};
-EditorUi.prototype.selectPage=function(a,c,f){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,f);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(n){this.handleError(n)}};
+EditorUi.prototype.selectPage=function(a,c,f){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,f);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(m){this.handleError(m)}};
EditorUi.prototype.selectNextPage=function(a){var c=this.currentPage;null!=c&&null!=this.pages&&(c=mxUtils.indexOf(this.pages,c),a?this.selectPage(this.pages[mxUtils.mod(c+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(c-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(a,c){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());c=null!=c?c:this.pages.length;var f=new ChangePage(this,a,a,c);this.editor.graph.model.execute(f)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
EditorUi.prototype.createPage=function(a,c){var f=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),c);f.setName(null!=a?a:this.createPageName());return f};EditorUi.prototype.createPageName=function(){for(var a={},c=0;c<this.pages.length;c++){var f=this.pages[c].getName();null!=f&&0<f.length&&(a[f]=f)}c=this.pages.length;do f=mxResources.get("pageWithNumber",[++c]);while(null!=a[f]);return f};
EditorUi.prototype.removePage=function(a){try{var c=this.editor.graph,f=mxUtils.indexOf(this.pages,a);if(c.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(f==this.pages.length-1?f--:f++,d=this.pages[f]):1>=this.pages.length&&(d=this.insertPage(),c.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,a,d))}finally{c.model.endUpdate()}}}catch(k){this.handleError(k)}return a};
-EditorUi.prototype.duplicatePage=function(a,c){var f=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");f=new DiagramPage(k);f.root=d.cloneCell(d.model.root);f.viewState=d.getViewState();f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(c);f=this.insertPage(f,mxUtils.indexOf(this.pages,a)+1)}}catch(n){this.handleError(n)}return f};
+EditorUi.prototype.duplicatePage=function(a,c){var f=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");f=new DiagramPage(k);f.root=d.cloneCell(d.model.root);f.viewState=d.getViewState();f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(c);f=this.insertPage(f,mxUtils.indexOf(this.pages,a)+1)}}catch(m){this.handleError(m)}return f};
EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,a,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return a};EditorUi.prototype.movePage=function(a,c){this.editor.graph.model.execute(new MovePage(this,a,c))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="13px";c.style.marginLeft="30px";for(var f=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-f)/this.pages.length)+1),k=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),k=b):mxEvent.consume(c)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k=
-null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&b!=k&&this.movePage(k,b);a.stopPropagation();a.preventDefault()}));c.appendChild(d)})(n,this.createTabForPage(this.pages[n],d,this.pages[n]!=this.currentPage,n+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);d=this.createPageMenuTab();
+f)/this.pages.length)+1),k=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),k=b):mxEvent.consume(c)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k=
+null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&b!=k&&this.movePage(k,b);a.stopPropagation();a.preventDefault()}));c.appendChild(d)})(m,this.createTabForPage(this.pages[m],d,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);d=this.createPageMenuTab();
this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(c.clientWidth>this.tabContainer.clientWidth-f){null!=d&&(d.style.position="absolute",d.style.right="0px",c.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 b=this.createControlTab(4,"&nbsp;&#10095;");
b.style.position="absolute";b.style.right=this.editor.chromeless?"0px":"29px";b.style.fontSize="13pt";this.tabContainer.appendChild(b);var e=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=e+"px";mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,e-20);mxUtils.setOpacity(q,0<c.scrollLeft?100:50);mxUtils.setOpacity(b,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(q,0<c.scrollLeft?100:
50);mxUtils.setOpacity(b,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,e-20);mxUtils.setOpacity(q,0<c.scrollLeft?100:50);mxUtils.setOpacity(b,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
@@ -3696,9 +3698,9 @@ EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<
0;b<this.pages.length;b++)mxUtils.bind(this,function(b){var d=a.addItem(this.pages[b].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[b])}),c);this.pages[b]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(b);if(this.editor.graph.isEnabled()){a.addSeparator(c);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),c);var d=this.currentPage;null!=d&&(a.addSeparator(c),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
function(){this.removePage(d)}),c),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),c),a.addSeparator(c),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(d,mxResources.get("copyOf",[d.getName()]))}),c))}}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var d=
mxEvent.getClientX(a),k=mxEvent.getClientY(a);c.popup(d,k,null,a);this.setCurrentMenu(c);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,c,f,d){f=this.createTab(f);var k=a.getName()||mxResources.get("untitled"),n=a.getId();f.setAttribute("title",k+(null!=n?" ("+n+")":"")+" ["+d+"]");mxUtils.write(f,k);f.style.maxWidth=c+"px";f.style.width=c+"px";this.addTabListeners(a,f);42<c&&(f.style.textOverflow="ellipsis");return f};
-EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var f=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(a);mxEvent.consume(c)}));var d=!1,k=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){d=null!=this.currentMenu;k=a==this.currentPage;f.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(n){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(n)&&k||mxEvent.isPopupTrigger(n))){f.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!d){var q=new mxPopupMenu(this.createPageMenu(a));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);this.resetCurrentMenu();q.destroy()});var b=mxEvent.getClientX(n),e=mxEvent.getClientY(n);q.popup(b,e,null,n);this.setCurrentMenu(q,c)}mxEvent.consume(n)}}))};
+EditorUi.prototype.createTabForPage=function(a,c,f,d){f=this.createTab(f);var k=a.getName()||mxResources.get("untitled"),m=a.getId();f.setAttribute("title",k+(null!=m?" ("+m+")":"")+" ["+d+"]");mxUtils.write(f,k);f.style.maxWidth=c+"px";f.style.width=c+"px";this.addTabListeners(a,f);42<c&&(f.style.textOverflow="ellipsis");return f};
+EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var f=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(a);mxEvent.consume(c)}));var d=!1,k=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){d=null!=this.currentMenu;k=a==this.currentPage;f.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(m)&&k||mxEvent.isPopupTrigger(m))){f.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!d){var q=new mxPopupMenu(this.createPageMenu(a));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);this.resetCurrentMenu();q.destroy()});var b=mxEvent.getClientX(m),e=mxEvent.getClientY(m);q.popup(b,e,null,m);this.setCurrentMenu(q,c)}mxEvent.consume(m)}}))};
EditorUi.prototype.getLinkForPage=function(a,c){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var f=this.getCurrentFile();if(null!=f&&f.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var d=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),d=d+((0==d.length?"?":"&")+"page-id="+a.getId());null!=c&&(d+="&"+c.join("&"));return window.location.protocol+"//"+window.location.host+"/"+d+"#"+f.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(a,c){return mxUtils.bind(this,function(f,d){var k=this.editor.graph;f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,c)}),d);null!=this.getLinkForPage(a)&&(f.addSeparator(d),f.addItem(mxResources.get("link"),
null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,d,b,e,f,p){c=this.createUrlParameters(c,d,b,e,f,p);b||c.push("hide-pages=1");k.isSelectionEmpty()||(b=k.getBoundingBox(k.getSelectionCells()),d=k.view.translate,e=k.view.scale,b.width/=e,b.height/=e,b.x=b.x/e-d.x,b.y=b.y/e-d.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(b.x),y:Math.round(b.y),width:Math.round(b.width),height:Math.round(b.height),border:100}))));
@@ -3707,42 +3709,42 @@ b=new EmbedDialog(this,this.getLinkForPage(a,c));this.showDialog(b.container,440
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(c,
a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,c,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(c.getAttribute("relatedPage"));if(null==k.relatedPage){var d=c.ownerDocument.createElement("diagram");d.setAttribute("id",c.getAttribute("relatedPage"));d.setAttribute("name",c.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=c.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),c.removeAttribute("viewState"));
-c=c.cloneNode(!0);d=c.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var f=d.getAttribute("id");null==a.lookup(f)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return c};a.afterDecode=function(a,c,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,f,n,q,b){f=null!=f?f:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var d=n.slice(),g=[],k=0;k<n.length;k++){var m=this.getCurrentCellStyle(n[k]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(n[k],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=n[k]&&g.push(a);return a==
-n[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(n[k],c))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!c);n=d;n=a.apply(this,arguments)}finally{this.model.endUpdate()}return n};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return y.isVertex(a)&&f(a)}function c(a){var b=!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving);
+c=c.cloneNode(!0);d=c.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var f=d.getAttribute("id");null==a.lookup(f)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return c};a.afterDecode=function(a,c,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,f,m,q,b){f=null!=f?f:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var d=m.slice(),g=[],k=0;k<m.length;k++){var n=this.getCurrentCellStyle(m[k]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(m[k],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=m[k]&&g.push(a);return a==
+m[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(m[k],c))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!c);m=d;m=a.apply(this,arguments)}finally{this.model.endUpdate()}return m};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return y.isVertex(a)&&f(a)}function c(a){var b=!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving);
return b}function f(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function q(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function b(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(a,c){c=null!=c?c:!0;t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingEdges(a),f=t.cloneCells([e[0],a]);t.model.setTerminal(f[0],t.model.getTerminal(e[0],!0),!0);var g=b(a),k=d.geometry;g==mxConstants.DIRECTION_SOUTH||
-g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=c?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=c?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),n=t.view.scale;if(null!=l){var m=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?m.x+=(c?a.geometry.width+10:-f[1].geometry.width-10)*n:m.y+=(c?a.geometry.height+10:-f[1].geometry.height-10)*n;var p=t.getOutgoingEdges(t.model.getTerminal(e[0],
-!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,y=k=e=0;y<p.length;y++){var x=t.model.getTerminal(p[y],!1);if(g==b(x)){var z=t.view.getState(x);x!=a&&null!=z&&(q&&c!=z.getCenterX()<l.getCenterX()||!q&&c!=z.getCenterY()<l.getCenterY())&&mxUtils.intersects(m,z)&&(e=10+Math.max(e,(Math.min(m.x+m.width,z.x+z.width)-Math.max(m.x,z.x))/n),k=10+Math.max(k,(Math.min(m.y+m.height,z.y+z.height)-Math.max(m.y,z.y))/n))}}q?k=0:e=0;for(y=0;y<p.length;y++)if(x=t.model.getTerminal(p[y],
-!1),g==b(x)&&(z=t.view.getState(x),x!=a&&null!=z&&(q&&c!=z.getCenterX()<l.getCenterX()||!q&&c!=z.getCenterY()<l.getCenterY()))){var B=[];t.traverse(z.cell,!0,function(a,b){null!=b&&B.push(b);B.push(a);return!0});t.moveCells(B,(c?1:-1)*e,(c?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var c=b(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);
-var f=t.model.getParent(a),g=f.geometry,k=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,n=a.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?l=0:c==mxConstants.DIRECTION_NORTH?(l=0,n=-n):c==mxConstants.DIRECTION_WEST?(l=-l,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);t.moveCells(k,l,n);return t.addCells(e,f)}finally{t.model.endUpdate()}}function p(a,c){t.model.beginUpdate();try{var d=
-t.model.getParent(a),e=t.getIncomingEdges(a),f=b(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=c);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var k=t.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),n;for(n in l)t.setCellStyles(n,l[n],[g[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==l[n]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?
-"vertical":"horizontal",[g[0]])}catch(da){}}var e=t.getOutgoingEdges(a),m=d.geometry,k=[];t.view.currentRoot==d&&(m=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),y=t.view.translate,z=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/z-y.x-m.x+10,g[1].geometry.y+=g[1].geometry.height-m.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
-null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/z-y.x+-m.x+10,g[1].geometry.y-=g[1].geometry.height+m.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+m.x+40):g[1].geometry.x+(g[1].geometry.width-m.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/z-y.y+-m.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function m(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,c){var d=b(a),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?v.actions.get("selectParent").funct():
-d==c?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=m(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var v=this,t=v.editor.graph,y=t.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
-if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);
-if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",
-function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],e=0;e<b.length;e++){var g=b[e];y.isEdge(g)&&f(g)&&(d.push(g),g=y.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=t.getIncomingEdges(b[e]),b=b.concat(g))}else null!=g&&d.push(b[e])}b=d;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
-d))};var A=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=A.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var n=this.cloneCell(g[0]);this.addEdge(n,
-t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var C=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var n=f,m=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(m,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=n&&f!=n&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]);
-if(0<q.length){var y=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=y){var z=t.view.getState(n);null!=z&&(c=(z.getCenterX()-y.getCenterX())/t.view.scale,d=(z.getCenterY()-y.getCenterY())/t.view.scale)}}}}l=C.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(n)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],n,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(n)&&0>mxUtils.indexOf(b,
-this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],n,!0);else if(0==t.getIncomingEdges(l[p]).length){m=n;if(null==m||m==t.model.getParent(b[p]))m=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),m,l[p])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var z=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=z.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
-null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
-(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
-null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(l(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){v.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=t.connectVertex;t.connectVertex=
-function(c,d,f,k,l,n,m){var q=t.getIncomingEdges(c);if(a(c)){var y=b(c),z=y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return y==d||0==q.length?p(c,d):z==x?g(c):e(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};t.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||q(b)||t.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
+g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=c?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=c?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),m=t.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(c?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(c?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=t.getOutgoingEdges(t.model.getTerminal(e[0],
+!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,y=k=e=0;y<p.length;y++){var u=t.model.getTerminal(p[y],!1);if(g==b(u)){var v=t.view.getState(u);u!=a&&null!=v&&(q&&c!=v.getCenterX()<l.getCenterX()||!q&&c!=v.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,v)&&(e=10+Math.max(e,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}q?k=0:e=0;for(y=0;y<p.length;y++)if(u=t.model.getTerminal(p[y],
+!1),g==b(u)&&(v=t.view.getState(u),u!=a&&null!=v&&(q&&c!=v.getCenterX()<l.getCenterX()||!q&&c!=v.getCenterY()<l.getCenterY()))){var A=[];t.traverse(v.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});t.moveCells(A,(c?1:-1)*e,(c?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var c=b(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);
+var f=t.model.getParent(a),g=f.geometry,k=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?l=0:c==mxConstants.DIRECTION_NORTH?(l=0,m=-m):c==mxConstants.DIRECTION_WEST?(l=-l,m=0):c==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(k,l,m);return t.addCells(e,f)}finally{t.model.endUpdate()}}function p(a,c){t.model.beginUpdate();try{var d=
+t.model.getParent(a),e=t.getIncomingEdges(a),f=b(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=c);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var k=t.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)t.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?
+"vertical":"horizontal",[g[0]])}catch(da){}}var e=t.getOutgoingEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),y=t.view.translate,v=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-y.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
+null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-y.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/v-y.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function n(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,c){var d=b(a),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?x.actions.get("selectParent").funct():
+d==c?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=n(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var x=this,t=x.editor.graph,y=t.getModel(),v=x.menus.createPopupMenu;x.menus.createPopupMenu=function(b,c,d){v.apply(this,arguments);
+if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};x.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);
+if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",
+function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(b,c){c=null!=
+c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],e=0;e<b.length;e++){var g=b[e];y.isEdge(g)&&f(g)&&(d.push(g),g=y.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=t.getIncomingEdges(b[e]),b=b.concat(g))}else null!=g&&d.push(b[e])}b=d;return D.apply(this,arguments)};x.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
+d))};var z=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=z.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
+t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var C=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]);
+if(0<q.length){var y=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=y){var v=t.view.getState(m);null!=v&&(c=(v.getCenterX()-y.getCenterX())/t.view.scale,d=(v.getCenterY()-y.getCenterY())/t.view.scale)}}}}l=C.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
+this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=x.sidebar){var A=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=A.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
+null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},G=x.onKeyDown;x.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
+(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
+null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(l(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){x.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=t.connectVertex;t.connectVertex=
+function(c,d,f,k,l,m,n){var q=t.getIncomingEdges(c);if(a(c)){var y=b(c),v=y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST,u=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return y==d||0==q.length?p(c,d):v==u?g(c):e(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};t.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||q(b)||t.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
return!0});return d};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
-this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
function(){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var u=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){u.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};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 f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=f.apply(this,arguments),c=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=
!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var b=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!0);b.insertEdge(d,!1);a.insert(d);a.insert(c);a.insert(b);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
c.vertex=!0;var b=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');b.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;
c.insertEdge(d,!0);b.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);f.insertEdge(k,!1);var m=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');m.vertex=!0;var 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;c.insertEdge(l,!0);m.insertEdge(l,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var t=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;c.insertEdge(t,!0);v.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(l);a.insert(t);a.insert(c);a.insert(b);a.insert(f);a.insert(m);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);f.insertEdge(k,!1);var n=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');n.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;c.insertEdge(l,!0);n.insertEdge(l,!1);var x=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');x.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);x.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(l);a.insert(t);a.insert(c);a.insert(b);a.insert(f);a.insert(n);a.insert(x);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;html=1;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -3765,8 +3767,8 @@ this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(
(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
"#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor=
-"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var n=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");n.apply(this,arguments)};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var b=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>
+"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateTabContainer;
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var b=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>
f&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):b.apply(this,arguments)};var e=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){e.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var 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="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");
@@ -3775,10 +3777,10 @@ a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUt
"geMenuItem";b.style.marginLeft="6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var p=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=
!0;p.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-",
"lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?
-this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var m=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.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),
-this.menus.findWindow=null);m.apply(this,arguments)};var l=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){l.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
-EditorUi.prototype.chromelessWindowResize=function(){};var v=Menus.prototype.init;Menus.prototype.init=function(){v.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
+this.menus.findWindow=null);n.apply(this,arguments)};var l=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){l.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
+EditorUi.prototype.chromelessWindowResize=function(){};var x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
function(){d.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
function(){c(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,mxResources.get("plantUml")+"...","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(b,mxResources.get("mermaid")+"...","mermaid");
b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,
@@ -3791,28 +3793,28 @@ function(a,c){b.menus.addMenuItems(a,"importText plantUml mermaid - formatSql im
function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",
c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
"30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat=
-"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
+"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?m.insertBefore(g,l.statusContainer):m.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
"no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled",
"disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function e(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?
-n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var c=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=c}p=n.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>f)||b("diagram");e([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
+m.insertBefore(c,l.statusContainer):m.appendChild(c);return c}function g(){for(var a=m.firstChild;null!=a;){var c=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=c}p=m.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>f)||b("diagram");e([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],a?60:null);c=b("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);e([c,d(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],a?60:null);if(411<=f&&(c=l.actions.get("undo"),a=l.actions.get("redo"),c=d("",c.funct,null,mxResources.get("undo")+" ("+c.shortcut+")",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("",
a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),e([c,a],60),480<=f)){var a=l.actions.get("zoomIn"),c=l.actions.get("zoomOut"),g=l.actions.get("resetView");
-e([d("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+e([d("",function(){n.popupMenuHandler.hideMenu();var a=n.view.scale,b=n.view.translate.x,c=n.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-n.view.scale)&&b==n.view.translate.x&&c==n.view.translate.y&&l.actions.get(n.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=f?d("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=f?d("",c.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==O&&(c=q.addMenu("",a.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor=
-"pointer",c.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(c),O=c),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}t.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=f||null!=urlParams.clibs||
-null!=urlParams.libs)&&c(this,!0);1E3<=f&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.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 p=null,q=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
-"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
-b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer=
+"pointer",c.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(c),O=c),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}t.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=f||null!=urlParams.clibs||
+null!=urlParams.libs)&&c(this,!0);1E3<=f&&a(this,!0);var l=this,n=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,q=new Menubar(l,m);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
+"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var x=l.descriptorChanged;l.descriptorChanged=function(){x.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
+b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};l.setStatusText(l.editor.getStatus());m.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(l.buttonContainer);l.menubarContainer=
l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var B=q.addMenu("100%",K.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration=
"none";B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(l.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";u.appendChild(B);K=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*
-l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(l.tabContainer);u.appendChild(n);u.appendChild(l.diagramContainer);
+l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(l.tabContainer);u.appendChild(m);u.appendChild(l.diagramContainer);
k.appendChild(u);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,c,f,d,k,n,q){this.file=a;this.id=c;this.content=f;this.modifiedDate=d;this.createdDate=k;this.isResolved=n;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,f,d,k){c()};DrawioComment.prototype.editComment=function(a,c,f){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DrawioUser=function(a,c,f,d,k){this.id=a;this.email=c;this.displayName=f;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,c,f,d,k,m,q){this.file=a;this.id=c;this.content=f;this.modifiedDate=d;this.createdDate=k;this.isResolved=m;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,f,d,k){c()};DrawioComment.prototype.editComment=function(a,c,f){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DrawioUser=function(a,c,f,d,k){this.id=a;this.email=c;this.displayName=f;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,c,f){this.init(a,c,f)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;
GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;
GraphViewer.prototype.init=function(a,c,f){this.graphConfig=null!=f?f:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=
@@ -3823,8 +3825,8 @@ mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,
1:"pagecount"==a?b.length:f.apply(this,arguments)}}}this.diagrams=[];var k=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};e=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=
[];this.xmlNode!=k&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),k=this.xmlNode)});this.addListener("xmlNodeChanged",e);e();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=
!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph);
-this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var m=this.graph.foldCells;this.graph.foldCells=mxUtils.bind(this,function(){this.cellFolded=
-!0;return m.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});f=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof f){var k=this.getObservableParent(a),n=new f(mxUtils.bind(this,function(c){0<a.offsetWidth&&(n.disconnect(),d())}));n.observe(k,{attributes:!0})}else d()}};
+this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var n=this.graph.foldCells;this.graph.foldCells=mxUtils.bind(this,function(){this.cellFolded=
+!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});f=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof f){var k=this.getObservableParent(a),m=new f(mxUtils.bind(this,function(c){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(k,{attributes:!0})}else d()}};
GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};
GraphViewer.prototype.setXmlNode=function(a){a=this.editor.extractGraphModel(a,!0);this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
@@ -3833,27 +3835,27 @@ c="relative"===document.body.style.position?document.body.getBoundingClientRect(
this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px");this.cellFolded&&(this.cellFolded=!1,this.center?this.graph.center():this.graph.view.setTranslate(0,0));f=!1}}),k=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var c=a.offsetWidth;c==k||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,
null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&
(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,c.width+2*this.graph.border),0==this.graphConfig.resize&&
-""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",
+""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var m=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(m);this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",
d);var q=mxUtils.bind(this,function(){var b=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||c.width+2*this.graph.border>a.offsetWidth||c.height+2*this.graph.border>d)){var f=null;null!=d&&c.height+2*this.graph.border>d-2&&(f=(d-2*this.graph.border-2)/c.height);this.fitGraph(f)}else this.widthIsEmpty||0!=this.graphConfig.resize||
""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-c.x/this.graph.view.scale),Math.floor(this.graph.border-c.y/this.graph.view.scale)),k=a.offsetWidth):this.graph.center((!this.widthIsEmpty||c.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=b});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){c=this.graph.getGraphBounds();k=null;q()}};
GraphViewer.prototype.updateContainerWidth=function(a,c){a.style.width=c+"px"};GraphViewer.prototype.updateContainerHeight=function(a,c){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=c+"px"};
-GraphViewer.prototype.showLayers=function(a,c){var f=this.graphConfig.layers,f=null!=f?f.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<f.length||k||null!=c){var n=null!=c?c.getModel():null,q=a.getModel();q.beginUpdate();try{for(var b=q.getChildCount(q.root),e=0;e<b;e++)q.setVisible(q.getChildAt(q.root,e),null!=c?n.isVisible(n.getChildAt(n.root,e)):!1);if(null==n)if(k)for(e=0;e<d.length;e++)q.setVisible(q.getCell(d[e]),!0);else for(e=0;e<f.length;e++)q.setVisible(q.getChildAt(q.root,
+GraphViewer.prototype.showLayers=function(a,c){var f=this.graphConfig.layers,f=null!=f?f.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<f.length||k||null!=c){var m=null!=c?c.getModel():null,q=a.getModel();q.beginUpdate();try{for(var b=q.getChildCount(q.root),e=0;e<b;e++)q.setVisible(q.getChildAt(q.root,e),null!=c?m.isVisible(m.getChildAt(m.root,e)):!1);if(null==m)if(k)for(e=0;e<d.length;e++)q.setVisible(q.getCell(d[e]),!0);else for(e=0;e<f.length;e++)q.setVisible(q.getChildAt(q.root,
parseInt(f[e])),!0)}finally{q.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var e=document.createElement("div");e.style.borderRight="1px solid #d0d0d0";e.style.padding="3px 6px 3px 6px";mxEvent.addListener(e,"click",a);null!=c&&e.setAttribute("title",c);e.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(e,"mouseenter",function(){e.style.backgroundColor="#ddd"}),mxEvent.addListener(e,"mouseleave",
function(){e.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),e.style.cursor="pointer"):mxUtils.setOpacity(e,30);e.appendChild(a);f.appendChild(e);p++;return e}var c=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?c.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(c.style.marginTop=this.toolbarHeight+"px");var f=c.ownerDocument.createElement("div");f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";
-f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="#eee";f.style.height=this.toolbarHeight+"px";this.toolbar=f;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(f,30);var d=null,k=null,n=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(f,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),n())}));mxEvent.addListener(f,mxClient.IS_POINTER?
+f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="#eee";f.style.height=this.toolbarHeight+"px";this.toolbar=f;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(f,30);var d=null,k=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(f,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),m())}));mxEvent.addListener(f,mxClient.IS_POINTER?
"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){q(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){q(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var b=this.graph,e=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<e&&Math.abs(this.scrollTop-b.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&(0<parseFloat(f.style.opacity||0)?n():q(30))}})}for(var g=this.toolbarItems,p=0,m=null,l=null,v=0;v<g.length;v++){var t=g[v];if("pages"==t){l=c.ownerDocument.createElement("div");
-l.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(l,70);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");y.style.borderRightStyle="none";y.style.paddingLeft="0px";y.style.paddingRight="0px";f.appendChild(l);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";t=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";y.style.display=l.style.display;x.style.display=l.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)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"==t){if(this.layersEnabled){var D=this.graph.getModel(),A=a(mxUtils.bind(this,function(a){if(null!=m)m.parentNode.removeChild(m),
-m=null;else{m=this.graph.createLayersDialog();mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});a=A.getBoundingClientRect();m.style.width="140px";m.style.padding="2px 0px 2px 0px";m.style.border="1px solid #d0d0d0";m.style.backgroundColor="#eee";m.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";m.style.fontSize="11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var b=mxUtils.getDocumentScrollOrigin(document);m.style.left=b.x+a.left+
-"px";m.style.top=b.y+a.bottom+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){A.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});A.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
+this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<e&&Math.abs(this.scrollTop-b.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&(0<parseFloat(f.style.opacity||0)?m():q(30))}})}for(var g=this.toolbarItems,p=0,n=null,l=null,x=0;x<g.length;x++){var t=g[x];if("pages"==t){l=c.ownerDocument.createElement("div");
+l.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(l,70);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");y.style.borderRightStyle="none";y.style.paddingLeft="0px";y.style.paddingRight="0px";f.appendChild(l);var v=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight="0px";t=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";y.style.display=l.style.display;v.style.display=l.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)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"==t){if(this.layersEnabled){var D=this.graph.getModel(),z=a(mxUtils.bind(this,function(a){if(null!=n)n.parentNode.removeChild(n),
+n=null;else{n=this.graph.createLayersDialog();mxEvent.addListener(n,"mouseleave",function(){n.parentNode.removeChild(n);n=null});a=z.getBoundingClientRect();n.style.width="140px";n.style.padding="2px 0px 2px 0px";n.style.border="1px solid #d0d0d0";n.style.backgroundColor="#eee";n.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";n.style.fontSize="11px";n.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(n,80);var b=mxUtils.getDocumentScrollOrigin(document);n.style.left=b.x+a.left+
+"px";n.style.top=b.y+a.bottom+"px";document.body.appendChild(n)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*p);null!=this.graphConfig.title&&(g=c.ownerDocument.createElement("div"),g.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;",g.setAttribute("title",this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,
70),f.appendChild(g),this.filename=g);this.minToolbarWidth=34*p;var C=c.style.border,g=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=c.getBoundingClientRect(),b=mxUtils.getScrollOrigin(document.body),b="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-b.x,top:-b.y},a={left:a.left-
-b.left,top:a.top-b.top,bottom:a.bottom-b.top,right:a.right-b.left};f.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=a.top+1+"px"):f.style.top=a.top+"px";"1px solid transparent"==C&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(f);var d=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=m&&(m.parentNode.removeChild(m),
-m=null);c.style.border=C});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==c||a==f||a==m)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else f.style.top=-this.toolbarHeight+"px",c.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",g):g()};
+b.left,top:a.top-b.top,bottom:a.bottom-b.top,right:a.right-b.left};f.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=a.top+1+"px"):f.style.top=a.top+"px";"1px solid transparent"==C&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(f);var d=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=n&&(n.parentNode.removeChild(n),
+n=null);c.style.border=C});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==c||a==f||a==n)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else f.style.top=-this.toolbarHeight+"px",c.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",g):g()};
GraphViewer.prototype.addClickHandler=function(a,c){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(f,d){if(null==d){var k=mxEvent.getSource(f);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=c?null==d||a.isCustomLink(d)?mxEvent.consume(f):a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){c.destroy()},0):null!=d&&null==c&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&
a.customLinkClicked(d)&&(mxUtils.clearSelection(),mxEvent.consume(f))}),mxUtils.bind(this,function(a){null!=c||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,c,f){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;f={client:1,lightbox:1,target:null!=f?f:"blank"};a&&(f.edit=this.graphConfig.edit||"_blank");if(null!=c?c:1)f.close=1;this.layersEnabled&&(f.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(f.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
@@ -3862,8 +3864,8 @@ f.drawdev="1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),c=document.createElement("div");mxClient.IS_QUIRKS?(c.style.position="absolute",c.style.left=a.x+"px",c.style.top=a.y+"px",c.style.width=document.body.offsetWidth+"px",c.style.height=document.body.offsetHeight+"px"):c.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";c.style.zIndex=this.lightboxZIndex;c.style.backgroundColor="#000000";mxUtils.setOpacity(c,70);document.body.appendChild(c);
var f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(f.style.position="absolute",f.style.right="32px",f.style.top=a.y+32+"px"):f.style.cssText="position:fixed;top:32px;right:32px;";f.style.cursor="pointer";mxEvent.addListener(f,"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?
this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var d=Graph.prototype.shadowId;Graph.prototype.shadowId=
-"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var n=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),q=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",n);document.body.removeChild(c);document.body.removeChild(f);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
-!0;q.apply(this,arguments)};var b=k.editor.graph,e=b.container;e.style.overflow="hidden";this.lightboxChrome?(e.style.border="1px solid #c0c0c0",e.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",n)):(c.style.display="none",f.style.display="none");var g=this;b.getImageFromBundles=function(a){return g.getImageUrl(a)};var p=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=p.apply(this,arguments);a.getImageFromBundles=function(a){return g.getImageUrl(a)};return a};
+"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var m=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),q=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",m);document.body.removeChild(c);document.body.removeChild(f);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
+!0;q.apply(this,arguments)};var b=k.editor.graph,e=b.container;e.style.overflow="hidden";this.lightboxChrome?(e.style.border="1px solid #c0c0c0",e.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(c.style.display="none",f.style.display="none");var g=this;b.getImageFromBundles=function(a){return g.getImageUrl(a)};var p=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=p.apply(this,arguments);a.getImageFromBundles=function(a){return g.getImageUrl(a)};return a};
this.graphConfig.move&&(b.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(e.style,"border-radius","4px"),e.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(e.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(e.style,"transition","all .25s ease-in-out"));this.addClickHandler(b,k);window.setTimeout(mxUtils.bind(this,function(){e.style.outline="none";
e.style.zIndex=this.lightboxZIndex;f.style.zIndex=this.lightboxZIndex;document.body.appendChild(e);document.body.appendChild(f);k.setFileData(this.xml);mxUtils.setPrefixedStyle(e.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(e.style.position="absolute",e.style.display="block",e.style.left=
a.x+"px",e.style.top=a.y+"px",e.style.width=document.body.clientWidth-80+"px",e.style.height=document.body.clientHeight-80+"px",e.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(b,this.graph);mxEvent.addListener(c,"click",function(){k.destroy()})}),0);return k};
@@ -3873,9 +3875,9 @@ GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassNam
GraphViewer.createViewerForElement=function(a,c){var f=a.getAttribute("data-mxgraph");if(null!=f){var d=JSON.parse(f),k=function(f){f=mxUtils.parseXml(f);f=new GraphViewer(a,f.documentElement,d);null!=c&&c(f)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}};
GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(c){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,c,f){if(null!=GraphViewer.cachedUrls[a])c(GraphViewer.cachedUrls[a]);else{var d=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){c(null!=d.getText?d.getText():d.responseText)};d.onerror=f;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},c=function(f,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function n(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=
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},c=function(f,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached=
new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==n(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 l=!1,m=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(m))};a(m);var p,q,E,G,F=function(){if((E=b.offsetWidth)!=p||(G=b.offsetHeight)!=q)l=!0,p=E,q=G;g()},I=function(a,b,c){a.attachEvent?
+b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var l=!1,n=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(n))};a(n);var p,q,E,G,F=function(){if((E=b.offsetWidth)!=p||(G=b.offsetHeight)!=q)l=!0,p=E,q=G;g()},I=function(a,b,c){a.attachEvent?
a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",F);I(f,"scroll",F)}var b=function(){GraphViewer.resizeSensorEnabled&&d()},e=Object.prototype.toString.call(f),g="[object Array]"===e||"[object NodeList]"===e||"[object HTMLCollection]"===e||"undefined"!==typeof jQuery&&f instanceof jQuery||"undefined"!==typeof Elements&&f instanceof Elements;if(g)for(var e=0,p=f.length;e<p;e++)q(f[e],b);else q(f,b);this.detach=function(){if(g)for(var a=0,b=f.length;a<b;a++)c.detach(f[a]);else c.detach(f)}};
c.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=c})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/package.json b/src/main/webapp/package.json
index c67f8f5e..871ba546 100644
--- a/src/main/webapp/package.json
+++ b/src/main/webapp/package.json
@@ -1,6 +1,6 @@
{
"name": "draw.io",
- "version": "13.3.6",
+ "version": "13.4.5",
"description": "diagrams.net desktop",
"main": "electron.js",
"scripts": {
@@ -27,11 +27,11 @@
"electron-log": "^4.2.0",
"electron-updater": "^4.3.1",
"electron-progressbar": "^1.2.0",
- "electron-store": "^5.1.1",
+ "electron-store": "^5.2.0",
"compression": "^1.7.4",
"crc": "^3.8.0"
},
"devDependencies": {
- "electron": "^9.0.4"
+ "electron": "^9.1.0"
}
}
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 53881582..e39466bf 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -6,7 +6,7 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
- "revision": "78e00fca1f842a747fb1385f0b553fe5"
+ "revision": "11cff84625b1ac0ec2f4f4460e9cc44e"
},
{
"url": "js/extensions.min.js",
diff --git a/src/main/webapp/yarn.lock b/src/main/webapp/yarn.lock
index f7ef4f76..764e9424 100644
--- a/src/main/webapp/yarn.lock
+++ b/src/main/webapp/yarn.lock
@@ -31,14 +31,14 @@
defer-to-connect "^1.0.1"
"@types/node@*":
- version "14.0.14"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.14.tgz#24a0b5959f16ac141aeb0c5b3cd7a15b7c64cbce"
- integrity sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ==
+ version "14.0.23"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.23.tgz#676fa0883450ed9da0bb24156213636290892806"
+ integrity sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==
"@types/node@^12.0.12":
- version "12.12.47"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.47.tgz#5007b8866a2f9150de82335ca7e24dd1d59bdfb5"
- integrity sha512-yzBInQFhdY8kaZmqoL2+3U5dSTMrKaYcb561VU+lDzAYvqt+2lojvBEy+hmpSNuXnPTx7m9+04CzWYOUqWME2A==
+ version "12.12.50"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.50.tgz#e9b2e85fafc15f2a8aa8fdd41091b983da5fd6ee"
+ integrity sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w==
"@types/semver@^7.1.0":
version "7.3.1"
@@ -56,9 +56,9 @@ accepts@~1.3.5:
negotiator "0.6.2"
ajv@^6.10.2:
- version "6.12.2"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd"
- integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==
+ version "6.12.3"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.3.tgz#18c5af38a111ddeb4f2697bd78d68abc1cabd706"
+ integrity sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
@@ -283,7 +283,7 @@ electron-progressbar@^1.2.0:
dependencies:
extend "^3.0.1"
-electron-store@^5.1.1:
+electron-store@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/electron-store/-/electron-store-5.2.0.tgz#a15718fc1fa21acfd07af55f9b94f9fa6a536665"
integrity sha512-iU3WDqEDAYNYR9XV7p0tJajq/zs9z7Nrn0sAoR5nDyn8h/9dr9kusKbTxD8NtVEBD1TB1pkGMqcbIt/y6knDwQ==
@@ -304,10 +304,10 @@ electron-updater@^4.3.1:
lodash.isequal "^4.5.0"
semver "^7.1.3"
-electron@^9.0.4:
- version "9.0.5"
- resolved "https://registry.yarnpkg.com/electron/-/electron-9.0.5.tgz#189ee117cc2a2777cccf40fae0766acec5faae57"
- integrity sha512-bnL9H48LuQ250DML8xUscsKiuSu+xv5umXbpBXYJ0BfvYVmFfNbG3jCfhrsH7aP6UcQKVxOG1R/oQExd0EFneQ==
+electron@^9.1.0:
+ version "9.1.0"
+ resolved "https://registry.yarnpkg.com/electron/-/electron-9.1.0.tgz#ca77600c9e4cd591298c340e013384114d3d8d05"
+ integrity sha512-VRAF8KX1m0py9I9sf0kw1kWfeC87mlscfFcbcRdLBsNJ44/GrJhi3+E8rKbpHUeZNQxsPaVA5Zu5Lxb6dV/scQ==
dependencies:
"@electron/get" "^1.0.1"
"@types/node" "^12.0.12"
@@ -579,9 +579,9 @@ lodash.isequal@^4.5.0:
integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA=
lodash@^4.17.10:
- version "4.17.15"
- resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
- integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
+ version "4.17.19"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
+ integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
lowercase-keys@^1.0.0, lowercase-keys@^1.0.1:
version "1.0.1"